UNPKG

react-global-state-hooks

Version:

This is a package to easily handling global-state across your react components No-redux, No-context.

13 lines (12 loc) 886 B
export type { StateSetter, HookExtensions, ObservableFragment, MetadataSetter, StateChanges, StoreTools, ActionCollectionResult, GlobalStoreCallbacks, UseHookConfig, UnsubscribeCallback, SubscribeCallbackConfig, SubscribeCallback, StateGetter, BaseMetadata, MetadataGetter, CustomGlobalHookBuilderParams, SelectorCallback, SubscriberParameters, SubscriptionCallback, StateHook, ActionCollectionConfig, } from 'react-hooks-global-states/types'; export type LocalStorageConfig = { key: string | (() => string); /** * The function used to encrypt the local storage, it can be a custom function or a boolean value (true = atob) */ encrypt?: boolean | ((value: string) => string); /** * The function used to decrypt the local storage, it can be a custom function or a boolean value (true = atob) */ decrypt?: boolean | ((value: string) => string); };