UNPKG

use-sharable-state

Version:
24 lines (23 loc) 706 B
declare const store: { addSetter: ({ stateKey, setterKey, setter, initialValue, }: { stateKey: string; setterKey: string; setter: (state: any) => void; initialValue?: any; }) => void; removeSetter: ({ stateKey, setterKey, }: { stateKey: string; setterKey: string; }) => void; updateState: ({ stateKey, value, }: { stateKey: string; value: any; }) => void; getCurrentState: (stateKey: string) => any; getCurrentSetter: ({ stateKey, setterKey, }: { stateKey: string; setterKey: string; }) => (state: any) => void; generateId: () => string; }; export default store;