Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting 'Async Storage has been extracted' warning when I'm not using Async Storage

Tags:

react-native

I'm getting one of the annoying yellow warning in my React Native app about Async Storage having been extracted from react-native core and will be removed yada yada yada. I'm not using anything with Async Storage (although some modules might be) and I haven't installed it ever. Why am I getting this warning when I'm not using it at all? Oh, and how do I get rid of it?

package.json

{
  "name": "LoganTransitApp3",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "react": "16.8.3",
    "react-fetch-hook": "^1.6.0-alpha.2",
    "react-native": "0.59.8",
    "react-native-geolocation-service": "^2.0.1",
    "react-native-gesture-handler": "^1.2.2",
    "react-native-iphone-x-helper": "^1.2.1",
    "react-native-maps": "^0.24.2",
    "react-native-permissions": "^1.1.1",
    "react-native-reanimated": "^1.0.1",
    "react-native-rename": "^2.4.1",
    "react-native-svg": "^9.4.0",
    "react-native-vector-icons": "^6.4.2",
    "react-navigation": "^3.11.0",
    "react-navigation-custom-bottom-tab-component": "^1.1.1",
    "react-navigation-tabs": "^2.1.3",
    "reactn": "^2.0.2"
  },
  "devDependencies": {
    "@babel/core": "^7.4.4",
    "@babel/runtime": "^7.4.4",
    "babel-jest": "^24.8.0",
    "eslint-config-rallycoding": "^3.2.0",
    "jest": "^24.8.0",
    "metro-react-native-babel-preset": "^0.54.0",
    "react-test-renderer": "16.8.3"
  },
  "jest": {
    "preset": "react-native"
  }
}
like image 261
pianoman102 Avatar asked Jan 27 '26 02:01

pianoman102


1 Answers

Your issue is likely related to the react-native-permissions package. The android implementation uses AsyncStorage :

import { AsyncStorage, NativeModules, PermissionsAndroid } from 'react-native'

permission.android.js

There is an open Pull Request that fixes this, but it has not been merged yet (Seems that the author is working on a big update of the library, so there have been no updates to master for over a year. Consider forking or looking into another library).

like image 68
Daniel Avatar answered Jan 28 '26 19:01

Daniel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!