Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning about importing AsyncStorage directly from react-native instead of @react-native-async-storage/async-storage #1

Open
supmanyu opened this issue May 25, 2023 · 0 comments

Comments

@supmanyu
Copy link

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-session-stats/src/SessionStats.js b/node_modules/react-native-session-stats/src/SessionStats.js
index 6e8be27..935ff4b 100644
--- a/node_modules/react-native-session-stats/src/SessionStats.js
+++ b/node_modules/react-native-session-stats/src/SessionStats.js
@@ -1,7 +1,7 @@
 import React, {Component} from 'react';
 import {node, func} from 'prop-types';
-import {AppState, AsyncStorage} from 'react-native';
-
+import {AppState} from 'react-native';
+import AsyncStorage from '@react-native-async-storage/async-storage';
 import SessionStatsContext from './context';
 import {STORAGE} from './constants';
 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant