elgerlambert / redux-localstorage

Store enhancer that syncs (a subset) of your Redux store state to localstorage.
MIT License
1.32k stars 107 forks source link

adapter for localForage is now unavailable from redux-localstorage #95

Open kevademfidel opened 5 years ago

kevademfidel commented 5 years ago

after I add @types/redux-localstorage, I could not use an adapter for a LocalForage type object.

import adapter from 'redux-localstorage/lib/adapters/localForage'; is now throwing an error:

TS2307: Cannot find module 'redux-localstorage/lib/adapters/localForage'.

However, if I import it this way: import adapter from 'redux-localstorage/lib/adapters/AsyncStorage';, the terminal says Module not found: Can't resolve 'redux-localstorage/lib/adapters/AsyncStorage' though it exists

can anyone help me with this issue? thanks!

anatoly314 commented 4 years ago

@kevademfidel have you find a solution for this issue

gabrielmmontenegro commented 3 years ago

NOTE: Be sure to check out the 1.0-breaking-changes branch (available on npm as redux-localstorage@rc). It includes support for flexible storage backends, including (but not limited to) sessionStorage and react-natives' AsyncStorage.

jmmwangi007 commented 2 years ago

Also getting this error: Error: Unable to resolve module redux-localstorage/lib/adapters/AsyncStorage from C:\Users\********\Desktop\********\src\store\store.js: redux-localstorage/lib/adapters/AsyncStorage could not be found within the project or in these directories: node_modules ..\..\node_modules

   6 | import authReducer from './slices/authenticated';
   7 | import AsyncStorage from '@react-native-async-storage/async-storage';
>  8 | import adapter from 'redux-localstorage/lib/adapters/AsyncStorage';
     |                      ^
   9 |
  10 | const storage = adapter(AsyncStorage);
  11 |