Undefined is not an object (evaluating 'RCTAsyncStorage.multiMerge' (React-native-asyncstorage)

前端 未结 1 603
小蘑菇
小蘑菇 2020-12-19 07:06

I am having an issue related to react-native-asyncstorage from here: https://facebook.github.io/react-native/docs/asyncstorage.html

When I run react-native run

相关标签:
1条回答
  • 2020-12-19 07:20

    Like said in the documentation: NOTE: This is not supported by all native implementations, you're probably running in an error because of this.

    It may also be Reactotron you're using (according to the stack trace) that causes this. Try disabling it at first?

    Are you having a custom implementation of AsyncStorage (like: https://www.npmjs.com/package/react-native-asyncstorage)? If so, take it off unless there's a specific reason to use it (please elaborate in the question)

    But in general, you could for instance use React Native Simple Store and it's update method.

    Or then you could write your own function with lodash.merge.

    If problem persists even with commenting out all the AsyncStorage code, removing possible custom dependencies and taking off Reactotron, and you can't find a way to write multiMerge by yourself, update your question and ping me on this answer.

    0 讨论(0)
提交回复
热议问题