UNPKG

recoil-sync-next

Version:

recoil-sync stores for Next.js

14 lines 782 B
import { RecoilSyncOptions, StoreKey } from 'recoil-sync'; export type GetHistoryKey = () => string | undefined; export type SaveItems = (historyKey: string, historyItems: Record<string, unknown>) => void; export type LoadItems = (historyKey: string) => Record<string, unknown>; export type ListenChangeHistory = (handler: (url: string) => void) => () => void; export type RecoilHistorySyncOptions = { storeKey?: StoreKey; getHistoryKey: GetHistoryKey; saveItems: SaveItems; loadItems: LoadItems; listenChangeHistory: ListenChangeHistory; }; export declare function useSyncHistory({ storeKey, getHistoryKey, saveItems, loadItems, listenChangeHistory, }: RecoilHistorySyncOptions): Omit<RecoilSyncOptions, 'children'>; //# sourceMappingURL=useSyncHistory.d.ts.map