UNPKG

1.09 kBTypeScriptView Raw
1import type { PropsWithChildren } from 'react';
2import type { Atom } from './atom';
3import { getScopeContext } from './contexts';
4import type { ScopeContainer } from './contexts';
5import { createStoreForExport } from './store';
6type Scope = NonNullable<Parameters<typeof getScopeContext>[0]>;
7export declare const Provider: ({ children, initialValues, scope, unstable_createStore, unstable_enableVersionedWrite, }: PropsWithChildren<{
8 initialValues?: Iterable<readonly [Atom<unknown>, unknown]>;
9 scope?: Scope;
10 /**
11 * This is an unstable feature to use exported createStore.
12 */
13 unstable_createStore?: typeof createStoreForExport;
14 /**
15 * This is an unstable experimental feature for React 18.
16 * When this is enabled, a) write function must be pure
17 * (read function must be pure regardless of this),
18 * b) React will show warning in DEV mode,
19 * c) then state branching works.
20 */
21 unstable_enableVersionedWrite?: boolean;
22}>) => import("react").FunctionComponentElement<import("react").ProviderProps<ScopeContainer>>;
23export {};