@vasilvelikov/effective-ui
    Preparing search index...

    Function withFallback

    • Enhances a data effect with loading and error fallback rendering.

      Type Parameters

      • I

        Input type to the effect.

      • E

        Error type the effect may throw.

      Parameters

      • effectFn: (input: I) => Effect<Node, E>

        The data effect that produces a DOM node.

      • fallback: { error: (err: E) => Effect<Node>; loading: () => Effect<Node> }

        A fallback object containing loading and error renderers.

      Returns (input: I) => Effect<Node>

      A function that wraps the effect in loading/error UI.