UNPKG

@lucianojd/recoil-sync-next

Version:

recoil-sync stores for Next.js

14 lines 822 B
import { RecoilSyncOptions, StoreKey } from 'recoil-sync'; export declare type GetHistoryKey = () => string | undefined; export declare type SaveItems = (historyKey: string, historyItems: Record<string, unknown>) => void; export declare type LoadItems = (historyKey: string) => Record<string, unknown>; export declare type ListenChangeHistory = (handler: (url: string) => void) => () => void; export declare 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