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
22 lines (21 loc) • 1.67 kB
TypeScript
/**
* 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 { StateSetter, HookExtensions, ObservableFragment, MetadataSetter, StateChanges, StoreTools, ActionCollectionResult, GlobalStoreCallbacks, UseHookConfig, UnsubscribeCallback, SubscribeCallbackConfig, SubscribeCallback, StateGetter, BaseMetadata, MetadataGetter, CustomGlobalHookBuilderParams, SelectorCallback, SubscriberParameters, SubscriptionCallback, StateHook, ActionCollectionConfig, StateMeta, } from "./types";
export { shallowCompare } from "./shallowCompare";
export { uniqueId } from "./uniqueId";
export { throwWrongKeyOnActionCollectionConfig } from "./throwWrongKeyOnActionCollectionConfig";
export { isRecord } from "./isRecord";
export { uniqueSymbol, type UniqueSymbol } from "./uniqueSymbol";
export { useStableState } from "./useStableState";
export { type ContextProviderAPI, type ContextProvider, type ContextHook, type CreateContext, createContext, } from "./createContext";
export type { AsyncStorageConfig } from "./types";
export { GlobalStore } from "./GlobalStore";
export { GlobalStoreAbstract } from "./GlobalStoreAbstract";
export { type CreateGlobalState, createGlobalState } from "./createGlobalState";
export { createCustomGlobalState, type CustomCreateGlobalState } from "./createCustomGlobalState";
export { getAsyncStorageItem } from "./getAsyncStorageItem";
export { setAsyncStorageItem } from "./setAsyncStorageItem";
export { asyncStorageWrapper, type AsyncStorageManager } from "./asyncStorageWrapper";
export { generateStackHash } from "./generateStackHash";