@shaaz1000/rn-storage
Version:
A comprehensive storage solution for React Native with encryption, caching, and offline sync
15 lines • 431 B
TypeScript
interface UseStorageOptions {
encrypt?: boolean;
cache?: boolean;
sync?: boolean;
expiryTime?: number;
}
export declare function useStorage<T>(key: string, initialValue: T, options?: UseStorageOptions): {
value: T;
setValue: (newValue: T) => Promise<void>;
remove: () => Promise<void>;
loading: boolean;
error: Error | null;
};
export default useStorage;
//# sourceMappingURL=useStorage.d.ts.map