Skip to content
module@warp-drive/react

Type Alias StoreProviderProps ​

ts
type StoreProviderProps = 
  | {
  children: ReactNode;
  store: Store;
}
  | {
  children: ReactNode;
  Store: typeof Store;
};

Defined in: -private/store-provider.tsx:41

The props accepted by `<StoreProvider />`: children, and either store, an existing Store instance to provide, or Store, a Store class the provider instantiates once and provides.

Union Members ​

Type Literal ​

ts
{
  children: ReactNode;
  store: Store;
}

children ​

ts
children: ReactNode;

The components that can read the store with useStore.

store ​

ts
store: Store;

The Store instance to provide.


Type Literal ​

ts
{
  children: ReactNode;
  Store: typeof Store;
}

children ​

ts
children: ReactNode;

The components that can read the store with useStore.

Store ​

ts
Store: typeof Store;

A Store class to instantiate once and provide.

Example ​

tsx
import type { StoreProviderProps } from "@warp-drive/react";

const props: StoreProviderProps = { store, children: <App /> };

Released under the MIT License.