@logixjs/react
    Preparing search index...

    Variable ReactPlatformConst

    ReactPlatform: {
        createRoot: (
            runtime: ManagedRuntime<any, any>,
        ) => (
            __namedParameters: { children: ReactNode },
        ) => FunctionComponentElement<RuntimeProviderProps>;
        Provider: FC<RuntimeProviderProps>;
        useDispatch: <H extends ReactModuleHandle>(
            handle: H,
        ) => Dispatch<ActionOfHandle<H>>;
        useLocalModule: {
            <S, A>(
                factory: LocalModuleFactory<S, A>,
                deps?: DependencyList,
            ): ModuleRef<S, A>;
            <Id extends string, Sh extends AnyModuleShape, Ext extends object = {}>(
                module: ModuleDef<Id, Sh, Ext>,
                options: ModuleTagOptions<Sh>,
            ): ModuleRef<
                StateOf<Sh>,
                ActionOf<Sh>,
                keyof Sh["actionMap"] & string,
                ModuleDef<Id, Sh, Ext>,
                ModuleDispatchers<
                    ActionOf<Sh>,
                    keyof Sh["actionMap"] & string,
                    ModuleDef<Id, Sh, Ext>,
                >,
            > & Ext;
            <Sh extends AnyModuleShape>(
                module: ModuleTag<string, Sh>,
                options: ModuleTagOptions<Sh>,
            ): ModuleRef<
                StateOf<Sh>,
                ActionOf<Sh>,
                keyof Sh["actionMap"] & string,
                ModuleTag<string, Sh>,
            >;
        };
        useModule: {
            <Id extends string, Sh extends AnyModuleShape, R = never>(
                handle: ModuleImpl<Id, Sh, R>,
            ): ModuleRef<
                StateOf<Sh>,
                ActionOf<Sh>,
                keyof Sh["actionMap"] & string,
                ModuleTag<Id, Sh>,
                ModuleDispatchersOfShape<Sh>,
            >;
            <Id extends string, Sh extends AnyModuleShape, R = never>(
                handle: ModuleImpl<Id, Sh, R>,
                options: ModuleImplOptions,
            ): ModuleRef<
                StateOf<Sh>,
                ActionOf<Sh>,
                keyof Sh["actionMap"] & string,
                ModuleTag<Id, Sh>,
                ModuleDispatchersOfShape<Sh>,
            >;
            <
                Id extends string,
                Sh extends AnyModuleShape,
                Ext extends object,
                R = never,
            >(
                handle: Module<Id, Sh, Ext, R>,
            ): ModuleRef<
                StateOf<Sh>,
                ActionOf<Sh>,
                keyof Sh["actionMap"] & string,
                Module<Id, Sh, Ext, R>,
                ModuleDispatchers<
                    ActionOf<Sh>,
                    keyof Sh["actionMap"] & string,
                    Module<Id, Sh, Ext, R>,
                >,
            > & Ext;
            <
                Id extends string,
                Sh extends AnyModuleShape,
                Ext extends object,
                R = never,
            >(
                handle: Module<Id, Sh, Ext, R>,
                options: ModuleImplOptions,
            ): ModuleRef<
                StateOf<Sh>,
                ActionOf<Sh>,
                keyof Sh["actionMap"] & string,
                Module<Id, Sh, Ext, R>,
                ModuleDispatchers<
                    ActionOf<Sh>,
                    keyof Sh["actionMap"] & string,
                    Module<Id, Sh, Ext, R>,
                >,
            > & Ext;
            <Id extends string, Sh extends AnyModuleShape, Ext extends object = {}>(
                handle: ModuleDef<Id, Sh, Ext>,
            ): ModuleRef<
                StateOf<Sh>,
                ActionOf<Sh>,
                keyof Sh["actionMap"] & string,
                ModuleDef<Id, Sh, Ext>,
                ModuleDispatchers<
                    ActionOf<Sh>,
                    keyof Sh["actionMap"] & string,
                    ModuleDef<Id, Sh, Ext>,
                >,
            > & Ext;
            <Id extends string, Sh extends AnyModuleShape>(
                handle: ModuleTag<Id, Sh>,
            ): ModuleRef<
                StateOf<Sh>,
                ActionOf<Sh>,
                keyof Sh["actionMap"] & string,
                ModuleTag<Id, Sh>,
                ModuleDispatchersOfShape<Sh>,
            >;
            <H extends ReactModuleHandle>(
                handle: H,
            ): ModuleRef<StateOfHandle<H>, ActionOfHandle<H>>;
            <Id extends string, Sh extends AnyModuleShape, R, V>(
                handle: ModuleImpl<Id, Sh, R>,
                selector: (state: StateOf<Sh>) => V,
                equalityFn?: (previous: V, next: V) => boolean,
            ): V;
            <Id extends string, Sh extends AnyModuleShape, R, V>(
                handle: Module<Id, Sh, any, R>,
                selector: (state: StateOf<Sh>) => V,
                equalityFn?: (previous: V, next: V) => boolean,
            ): V;
            <Id extends string, Sh extends AnyModuleShape, V>(
                handle: ModuleDef<Id, Sh, any>,
                selector: (state: StateOf<Sh>) => V,
                equalityFn?: (previous: V, next: V) => boolean,
            ): V;
            <Id extends string, Sh extends AnyModuleShape, V>(
                handle: ModuleTag<Id, Sh>,
                selector: (state: StateOf<Sh>) => V,
                equalityFn?: (previous: V, next: V) => boolean,
            ): V;
            <H extends ReactModuleHandle, V>(
                handle: H,
                selector: (state: StateOfHandle<H>) => V,
                equalityFn?: (previous: V, next: V) => boolean,
            ): V;
        };
        useSelector: {
            <H extends ReactModuleHandle>(handle: H): StateOfHandle<H>;
            <H extends ReactModuleHandle, V>(
                handle: H,
                selector: (state: StateOfHandle<H>) => V,
                equalityFn?: (previous: V, next: V) => boolean,
            ): V;
        };
    } = ...

    Type Declaration

    • createRoot: (
          runtime: ManagedRuntime<any, any>,
      ) => (
          __namedParameters: { children: ReactNode },
      ) => FunctionComponentElement<RuntimeProviderProps>

      Creates a root provider component for a given runtime.

      The caller is responsible for constructing and managing the Runtime lifecycle (typically via Logix.Runtime.make). ReactPlatform only provides that Runtime within the React tree.

    • Provider: FC<RuntimeProviderProps>

      Creates a React component that provides the Logix runtime to its children.

    • useDispatch: <H extends ReactModuleHandle>(handle: H) => Dispatch<ActionOfHandle<H>>

      Hook to get the dispatch function for a module.

    • useLocalModule: {
          <S, A>(
              factory: LocalModuleFactory<S, A>,
              deps?: DependencyList,
          ): ModuleRef<S, A>;
          <Id extends string, Sh extends AnyModuleShape, Ext extends object = {}>(
              module: ModuleDef<Id, Sh, Ext>,
              options: ModuleTagOptions<Sh>,
          ): ModuleRef<
              StateOf<Sh>,
              ActionOf<Sh>,
              keyof Sh["actionMap"] & string,
              ModuleDef<Id, Sh, Ext>,
              ModuleDispatchers<
                  ActionOf<Sh>,
                  keyof Sh["actionMap"] & string,
                  ModuleDef<Id, Sh, Ext>,
              >,
          > & Ext;
          <Sh extends AnyModuleShape>(
              module: ModuleTag<string, Sh>,
              options: ModuleTagOptions<Sh>,
          ): ModuleRef<
              StateOf<Sh>,
              ActionOf<Sh>,
              keyof Sh["actionMap"] & string,
              ModuleTag<string, Sh>,
          >;
      }

      Hook to create and use a local module instance.

    • useModule: {
          <Id extends string, Sh extends AnyModuleShape, R = never>(
              handle: ModuleImpl<Id, Sh, R>,
          ): ModuleRef<
              StateOf<Sh>,
              ActionOf<Sh>,
              keyof Sh["actionMap"] & string,
              ModuleTag<Id, Sh>,
              ModuleDispatchersOfShape<Sh>,
          >;
          <Id extends string, Sh extends AnyModuleShape, R = never>(
              handle: ModuleImpl<Id, Sh, R>,
              options: ModuleImplOptions,
          ): ModuleRef<
              StateOf<Sh>,
              ActionOf<Sh>,
              keyof Sh["actionMap"] & string,
              ModuleTag<Id, Sh>,
              ModuleDispatchersOfShape<Sh>,
          >;
          <
              Id extends string,
              Sh extends AnyModuleShape,
              Ext extends object,
              R = never,
          >(
              handle: Module<Id, Sh, Ext, R>,
          ): ModuleRef<
              StateOf<Sh>,
              ActionOf<Sh>,
              keyof Sh["actionMap"] & string,
              Module<Id, Sh, Ext, R>,
              ModuleDispatchers<
                  ActionOf<Sh>,
                  keyof Sh["actionMap"] & string,
                  Module<Id, Sh, Ext, R>,
              >,
          > & Ext;
          <
              Id extends string,
              Sh extends AnyModuleShape,
              Ext extends object,
              R = never,
          >(
              handle: Module<Id, Sh, Ext, R>,
              options: ModuleImplOptions,
          ): ModuleRef<
              StateOf<Sh>,
              ActionOf<Sh>,
              keyof Sh["actionMap"] & string,
              Module<Id, Sh, Ext, R>,
              ModuleDispatchers<
                  ActionOf<Sh>,
                  keyof Sh["actionMap"] & string,
                  Module<Id, Sh, Ext, R>,
              >,
          > & Ext;
          <Id extends string, Sh extends AnyModuleShape, Ext extends object = {}>(
              handle: ModuleDef<Id, Sh, Ext>,
          ): ModuleRef<
              StateOf<Sh>,
              ActionOf<Sh>,
              keyof Sh["actionMap"] & string,
              ModuleDef<Id, Sh, Ext>,
              ModuleDispatchers<
                  ActionOf<Sh>,
                  keyof Sh["actionMap"] & string,
                  ModuleDef<Id, Sh, Ext>,
              >,
          > & Ext;
          <Id extends string, Sh extends AnyModuleShape>(
              handle: ModuleTag<Id, Sh>,
          ): ModuleRef<
              StateOf<Sh>,
              ActionOf<Sh>,
              keyof Sh["actionMap"] & string,
              ModuleTag<Id, Sh>,
              ModuleDispatchersOfShape<Sh>,
          >;
          <H extends ReactModuleHandle>(
              handle: H,
          ): ModuleRef<StateOfHandle<H>, ActionOfHandle<H>>;
          <Id extends string, Sh extends AnyModuleShape, R, V>(
              handle: ModuleImpl<Id, Sh, R>,
              selector: (state: StateOf<Sh>) => V,
              equalityFn?: (previous: V, next: V) => boolean,
          ): V;
          <Id extends string, Sh extends AnyModuleShape, R, V>(
              handle: Module<Id, Sh, any, R>,
              selector: (state: StateOf<Sh>) => V,
              equalityFn?: (previous: V, next: V) => boolean,
          ): V;
          <Id extends string, Sh extends AnyModuleShape, V>(
              handle: ModuleDef<Id, Sh, any>,
              selector: (state: StateOf<Sh>) => V,
              equalityFn?: (previous: V, next: V) => boolean,
          ): V;
          <Id extends string, Sh extends AnyModuleShape, V>(
              handle: ModuleTag<Id, Sh>,
              selector: (state: StateOf<Sh>) => V,
              equalityFn?: (previous: V, next: V) => boolean,
          ): V;
          <H extends ReactModuleHandle, V>(
              handle: H,
              selector: (state: StateOfHandle<H>) => V,
              equalityFn?: (previous: V, next: V) => boolean,
          ): V;
      }

      Hook to use a module from the provided runtime.

    • useSelector: {
          <H extends ReactModuleHandle>(handle: H): StateOfHandle<H>;
          <H extends ReactModuleHandle, V>(
              handle: H,
              selector: (state: StateOfHandle<H>) => V,
              equalityFn?: (previous: V, next: V) => boolean,
          ): V;
      }

      Hook to select a slice of state from a module.