UNPKG

react-native-global-state-hooks

Version:

This is a package to easily handling global-state across your react-native-components No-redux... The library now includes @react-native-async-storage/async-storage to persist your state across sessions... if you want to keep using the old version without

15 lines (14 loc) 1.21 kB
/** * By handling the same structure as the original library, * We can add the specific overrides for web while keeping the modularity of the library. */ export type { StateApi, ObservableFragment, MetadataSetter, StateChanges, StoreTools, ActionCollectionResult, GlobalStoreCallbacks, UseHookOptions, UnsubscribeCallback, SubscribeCallbackConfig, SubscribeCallback, BaseMetadata as BaseMetadata, MetadataGetter, SelectorCallback, SubscriberParameters, SubscriptionCallback, StateHook, ActionCollectionConfig, } from "./types"; export { shallowCompare } from "./shallowCompare"; export { uniqueId, type BrandedId } from "./uniqueId"; export { throwWrongKeyOnActionCollectionConfig } from "./throwWrongKeyOnActionCollectionConfig"; export { isRecord } from "./isRecord"; export { type ContextProvider, type ContextHook, type InferContextApi, createContext } from "./createContext"; export type { AsyncStorageConfig } from "./types"; export { default as GlobalStore } from "./GlobalStore"; export { createGlobalState, type InferActionsType, type InferStateApi, type AnyActions, } from "./createGlobalState"; export { default as asyncStorageWrapper, type AsyncStorageManager } from "./asyncStorageWrapper";