-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Navigator is deprecated in RN 0.44.0 and not working #1328
Comments
As error message indicates, you should install react-native-deprecated-custom-components and import NavigationExperimental from there. |
@grabbou but i think you closed immediatly without any define a correct solution . |
There's no issue to be solved. Navigation experimental has been removed from React Native and moved to a separate package that I've listed above. You should slowly upgrade your code to use a new navigation library, like this one. Before that happens, you can keep on using Navigation Experimental from the above package. |
hi,grabbou,i read your tips and installed react-native-deprecated-custom-components,and import Navigator from 'react-native-deprecated-custom-components' ,but an error occured,it said that Element type is invild:excepted a string or a class/function but got: object; |
@muxiaodeng I think you should import NavigationExperimental and not Navigator: |
@ashish-algorythma thanks,but it didn't work,still say Element type is invalid; |
I have the same problem |
@amirrezamahyari Do you have resolve? |
Fixed with: Use with: |
I fixed it with code
|
Why was React Navigator deprecated? |
@rexjrs Because in last version it don't use Navigator in react-native . It switch to use react-native-deprecated-custom-components. You can see notied when running app. |
No. My question is, what was the reason behind deprecating the Navigator component? Was it bad, were there much better alternatives? etc. |
Hey Chaps I am using |
@saeedtabrizi see this issue |
@amirrezamahyari HAZA MEN FAZLE RABBI, thanks a lot . @peterheard01 , @rexjrs for the solve this problem we commented Navigation component in react native folder in node_modules :) only deprecated message is root of this problem so when we remove Navigation component from react , that working as well as my car :) |
@saeedtabrizi can you clearly explain what you mean by comment in react native folder in node modules? How can I do this. |
@saeedtabrizi thanks MOHANDES |
Thank you very much! |
@davidck Did you need to pull in something from NPM too? I get a 500 error when i use react-native-deprecated-custom-components. |
@prateekvarma |
@amirrezamahyari Your comment helped me. Thank you very much. |
so what was the reason to kick it out? just because react-navigation is more powerful? |
I have a problem when i use NavigationBar. Who you know way to solve this problem with react-native-deprecated-custom-components ? Thank you |
So what is the officially replacement for Navigator. (i'm using NavigationExperimental.Navigator instead, for it much likely Navigator) |
@nvs2394 Thanks man...your code helped me. btw does anyone know the difference between StackNavigator and NavigationExperimental.Navigator ? |
I also would like to know what's the best replacement for Navigator? |
In RN0.44 Not support old Navigator. You should installed and imported from react-native-deprecated-custom-components instead of react-native |
What to use instead of Navigator? using deprecated components in my project make me feel uncomfortable. |
Use react-navigation. It is the most used one and very powerful. |
@davidck 👍 Many thanks for all your helps. Its really better anything |
I think A possible plan is to move Navigator out into a separate repo and publish it to npm, and till then they have provided a temporary solution |
@muxiaodeng I guess you are importing like this : Try change it to: |
The react-native-deprecated-custom-components is using deprecated methods that are no longer available in React 16.0. Until someone updates the component, it is broken. |
Yee.. tell me about that, after i struggle for 1 hour without success, i moved to the new navigator. |
Use GitHub version instead of NPM:
|
Hi @roysG |
Hi guys, Error: npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. npm ERR! A complete log of this run can be found in: |
@roysG it's good news from you , but i guess you must review your navigation configuration again . |
@roysG use PropTypes.func instead of React.PropTypes.func if you haven't implement the changes |
There are a lot breaking changes! |
i have the same error |
I had the error even though I wasn't trying to use
Changing that to
Fixed the issue. It turns out if you do |
They are often too many breaking changes. Update the codebase of your existing project is a nightmare. |
@rh389 Thank you, you saved my life, was getting this error even not using the Navigator. |
Hi @roysG did you solved that error? |
@saeedtabrizi Hi, I have commented the code(Navigator) in the node_modules but it's throwing a new error @peterheard01 how to update this below code to use StackNavigator
|
@VarunDcoder I'm going through the same situation. Did you solve the problem? |
Hi @andreia-sl By downgrading react native versions and resetting the cache with the following line script : |
I gave up using the Navigator and am using RouterFlux. But thx @VarunDcoder |
if depresiate and pakage is remove ---error |
you show use this now : |
if you already upgrade Just search Then just upgrade them to latest version or fixed version for These are my dependency. I got same issue after upgrade to
|
after upgrade react native to 0.44.0 i get this error :
i use react-navigation 1.0.0-beta.9 package and i got BackAndroid deprecated too .
Navigator is deprecated and has been removed from this package. It can now be installed and imported from
react-native-deprecated-custom-components
instead ofreact-native
. Learn about alternative navigation solutions at http://facebook.github.io/react-native/docs/navigation.htmlhow can i fix this ?
The text was updated successfully, but these errors were encountered: