UNPKG

atomic-state

Version:

Atomic State is a state management library for React

25 lines (24 loc) 741 B
import { PersistenceStoreType } from '../mod'; export declare function AtomicStateAsync({ children, default: def, value, storeName, persistenceProvider }: { clientOnly?: boolean; children: any; /** * Set default values using an atom's key */ default?: { [key: string]: any; }; value?: { [key: string]: any; }; /** * The store name where atoms under the tree will be saved */ storeName?: string | boolean; /** * The persistence provider (optional). It should have the `getItem`, `setItem` and `removeItem` methods. * * @default localStorage */ persistenceProvider?: PersistenceStoreType; }): Promise<import("react/jsx-runtime").JSX.Element>;