expo-filesystem-storage

1.0.5 • Public • Published

expo-filesystem-storage

Storage engine for Expo FileSystem API. Alternative of default AsyncStorage to get over storage size limitations in Android.

Install

npm install expo-filesystem-storage

Usage with redux-persist

import createExpoFileSystemStorage from 'expo-filesystem-storage'

...

const expoFsStorage = createExpoFileSystemStorage();

const persistConfig = {
  key: 'root',
  storage: expoFsStorage,
};

const persistedReducer = persistReducer(persistConfig, reducer);

const store = createStore(persistedReducer);
const persistor = persistStore(store);

...

Customized options

...

const customOptions = {
  storagePath: `${FileSystem.documentDirectory}persistStore`,
  debug: true,
}

const expoFsStorage = createExpoFileSystemStorage(customOptions);

...

Dependents (0)

Package Sidebar

Install

npm i expo-filesystem-storage

Weekly Downloads

59

Version

1.0.5

License

ISC

Unpacked Size

5.5 kB

Total Files

4

Last publish

Collaborators

  • lyuboivanov