• Returns a stable Node<T> for key within the enclosing <CauslProvider>. The factory runs once per key per provider; subsequent mounts of the same key return the cached handle. The node is disposed via @causl/causl-wasm-ts/internal's dispose when the last consumer unmounts (deferred to the next microtask so StrictMode's double-invoke does not destroy and recreate the node).

    Type Parameters

    • T

      Value type of the node the factory produces.

    Parameters

    • key: string

      Keying identity. Identity is per-(provider, key); two providers around the same graph maintain isolated namespaces.

    • factory: FamilyFactory<T>

      Producer that constructs and registers the node the first time key is seen in this provider.

    Returns Node<T>

    The cached or freshly-registered node handle for key.

    Error when called outside a <CauslProvider>.

    const node = useCauslFamily(`row:${rowId}`, (graph, key) =>
    graph.input(key, defaultRow),
    )
    const value = useCausl((g) => g.read(node))