Closed harveyconnor closed 5 years ago
Alternative solution is to include the storage key in your Datastore constructor, please add typings for this.
import AsyncStorage from '@react-native-community/async-storage';
const db = new Datastore({
...,
storage: AsyncStorage
});
thank you @harveyconnor!
Hy, @harveyconnor - I tested it on a simulator and this branch did not work, were you able to run a project with this change? I had to do a rollback.
@antoniopresto I'm currently using your 3.0.2 branch and it seems to work fine. There are some issues when you remove asyncstorage from node modules as it still gets picked up. I guess its best to wait for more community support on the asyncstorage as it seems its not fully deprecated from RN.
I'm not sure which option we're supposed to used when imported either. We used to import AsyncStorage from 'react-native' and that worked fine, however when we do that there's no default export anymore for AsyncStorage.
Unless we make some changes to RNC AsyncStorage we'll have to wait and see.
@harveyconnor After adding the storage option i am not able to retrieve the old data stored
https://github.com/antoniopresto/react-native-local-mongodb/issues/80#issue-1760060398