The navigator is outdated and removed, even I don't use the navigator

I am not using Navigator in my codes. But I am getting this error.

enter image description here

"dependencies": {
    "react": "16.0.0-alpha.12",
    "react-native": "0.45.1",
    "react-native-deprecated-custom-components": "^0.1.0",
    "react-native-router-redux": "^0.2.2",
    "react-redux": "^5.0.5",
    "redux": "^3.7.0"
},
"devDependencies": {
    "babel-jest": "20.0.3",
    "babel-preset-react-native": "2.0.0",
    "jest": "20.0.4",
    "react-test-renderer": "16.0.0-alpha.12"
}

      

Can anyone help me?

+3


source to share


3 answers


This happened to me when my IDE automatically added the following lines:

import * as AsyncStorage from "react-native";

      



which means: everything in this file that won't work. Solving it by changing this:

import AsyncStorage from "react-native";

      

+2


source


Navigator

is no longer supported in react native, so this is no longer allowed:

import { Navigator } from 'react-native'



Extract the Navigator from the import import and replace it with the following: import { Navigator } from 'react-native-deprecated-custom-components';

+1


source


Experimental navigation (previously Navigator

) has been removed from React Native and moved to a separate package react-native-deprecated-custom-components

. It is deprecated and deprecated. To fix your old code you can follow these steps

  • Install package react-native-deprecated-custom-components

    npm install react-native-deprecated-custom-components --save

  • NavigationExperimental import (formerly Navigator

    )

    import NavigationExperimental from 'react-native-deprecated-custom-comreponents';

  • Replace Navigator

    withNavigationExperimental.Navigator

0


source







All Articles