@logixjs/react
    Preparing search index...

    Function useLayerModule

    • Creates a local ModuleRuntime from an already assembled Module Layer (e.g. RegionLive).

      Use cases:

      • On the effect side, you already built the full Layer via Module.live(initial, ...logics).
      • A React component wants to "just consume" that Layer without caring about initial/logics details.

      Type Parameters

      • Id extends string
      • Sh extends AnyModuleShape

      Parameters

      • module: ModuleTag<Id, Sh>
      • layer: Layer<ModuleRuntime<StateOf<Sh>, ActionOf<Sh>>, never, any>
      • deps: DependencyList = []

      Returns ModuleRef<StateOf<Sh>, ActionOf<Sh>>