-
Notifications
You must be signed in to change notification settings - Fork 45
Parsing local storage data in React Native #28
Comments
We have integration test that tests default storage, but we do not test async store/react native case. I will try to test that early in the morning and see what is actually saved to store. Please use previos version for now. |
@AndrewMorsillo I will need your help with this. I will need the following details in order to assist here:
You should have full access rights for both repositories. |
@AndrewMorsillo I think that we need to simply check if object needs to be parsed or it is actual js object. window.localStorage returns string and current implementation support is. Not sure what AsyncStore we have been using for this. Once we get some changes into the React Native we will unify interface. I think we need to have a wrapper for window.localStorage and our interface will always return |
Thanks for making that repo. I'm working on an example project hopefully to be ready in the next few days. I'll be sure to push it there. I'll be investigating the AsyncStorage thing today. Got delayed yesterday because I didn't realize that react native bundler (metro) doesn't work with symlinks (npm link) so I had a hard time setting up a local copy of offix-client. I'm pretty new to graphql, react-native, expo, and developing npm libraries so it may take me a bit. A lot to learn! |
We have done a couple of improvements to abstract storage interface inside offix and hoping to release new version over the comming days. So most of the problems should dissapear and things should work out of the box. |
Unfortunately my team has decided not to use apollo/graphql for our latest project so I won't have time to contribute here for some time. I think this issue can be closed since it sounds like the storage abstraction should render it a non-issue. |
@AndrewMorsillo Thank you so much for the update! |
As the title says I upgraded to 0.5.0 and it crashes here
It looks like the
getOfflineData
function doesn't properly handle invalid data from the store. I'm using 0.5.0 on react-native (expo) with AsyncStorage.Edit: It actually crashes using AsyncStorage no matter what now. It isn't just with old data. I cleared the data on the simulator and the result is the same. This worked in the previous version without problems.
The text was updated successfully, but these errors were encountered: