Skip to content

Commit 9fa8ab9

Browse files
tido64Krzysztof Borowy
authored and
Krzysztof Borowy
committed
fix: Prefer RNC's AsyncStorage over RN's.
React Native's (deprecated) AsyncLocalStorage is being picked up before RNC's.
1 parent 485eba4 commit 9fa8ab9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/AsyncStorage.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
const {NativeModules} = require('react-native');
1515

1616
const RCTAsyncStorage =
17-
NativeModules.AsyncLocalStorage || // Support for external modules, like react-native-windows
1817
NativeModules.RNC_AsyncSQLiteDBStorage ||
19-
NativeModules.RNCAsyncStorage;
18+
NativeModules.RNCAsyncStorage ||
19+
NativeModules.AsyncLocalStorage; // Support for external modules, like react-native-windows
2020

2121
if (!RCTAsyncStorage) {
2222
throw new Error(`[@RNC/AsyncStorage]: NativeModule: AsyncStorage is null.

0 commit comments

Comments
 (0)