React Native Debugger app version: 0.10.4; reproducible with master
React Native version: 0.61.2
Platform: iOS
Is real device of platform: yes
Operating System: macOS 10.14.6
When invoking showAsyncStorageContentInDev() in the console, you receive the content of the current AsyncStorage. After programmatically changing the content of the AsyncStorage and after invoking showAsyncStorageContentInDev() again, you receive the same content of the AsyncStorage you received earlier. This should not happen.
On my device, these differences lead to a different NativeModule being used. This lib uses NativeModules.AsyncLocalStorage, while react-native-community uses NativeModules.RNCAsyncStorage. Changing the implementation of this lib to match the 'official' one fixes these issues on my device. Let me know if you're interested in a pull request adressing this issue that includes this fix.
React Native Debugger app version: 0.10.4; reproducible with master React Native version: 0.61.2 Platform: iOS Is real device of platform: yes Operating System: macOS 10.14.6
When invoking
showAsyncStorageContentInDev()
in the console, you receive the content of the current AsyncStorage. After programmatically changing the content of the AsyncStorage and after invokingshowAsyncStorageContentInDev()
again, you receive the same content of the AsyncStorage you received earlier. This should not happen.After some digging, I noticed the following differences in the resolution for
RCTAsyncStorage
in this library: https://github.com/jhen0409/react-native-debugger/blob/370205764045016b796916f33fdfaeb7b89ad5d1/app/worker/asyncStorage.js#L25-L30and in the official react-native-async-storage library (https://github.com/react-native-community/async-storage/blob/b04ffbf1b80bdf5295cb36c21fc5ca62a7333e3c/lib/AsyncStorage.js#L16-L19):
On my device, these differences lead to a different NativeModule being used. This lib uses
NativeModules.AsyncLocalStorage
, whilereact-native-community
usesNativeModules.RNCAsyncStorage
. Changing the implementation of this lib to match the 'official' one fixes these issues on my device. Let me know if you're interested in a pull request adressing this issue that includes this fix.