Skip to content

Commit 355e76d

Browse files
committed
store: use @react-native-community/async-storage
Switch to actually using @react-native-community/async-storage. The module is written in Flow under the hood, but strangely doesn't expose the Flow types in its standard entry point. We therefore import directly from the relevant interior file to get proper type definitions. This will have to be revisited in the future, as the module is currently being completely rewritten to use TypeScript. Fixes zulip#3570.
1 parent 2e3a0e2 commit 355e76d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/boot/ZulipAsyncStorage.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* @flow strict-local */
2-
import { AsyncStorage, NativeModules } from 'react-native';
2+
import AsyncStorage from '@react-native-community/async-storage/lib/AsyncStorage';
3+
import { NativeModules } from 'react-native';
34
import * as logging from '../utils/logging';
45

56
export default class ZulipAsyncStorage {

0 commit comments

Comments
 (0)