expo-filesystem-storage

    1.0.3 • 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);
     
    ...
     

    Install

    npm i expo-filesystem-storage

    DownloadsWeekly Downloads

    30

    Version

    1.0.3

    License

    ISC

    Unpacked Size

    5.5 kB

    Total Files

    4

    Last publish

    Collaborators

    • lyuboivanov