UNPKG

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