UNPKG

use-sharable-state

Version:
33 lines (32 loc) 916 B
declare const store: { mappedData: { [K: string]: { value: any; setters: { [K: string]: (state: any) => void; }; }; }; 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; clearStates: () => void; }; export default store;