-
Notifications
You must be signed in to change notification settings - Fork 24.7k
Deprecating Navigator and React Navigation #12103
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
Comments
It seems counter-intuitive that NavigationExperimental should get better treatment (ie. stay in core), given its name and nature. I feel like it should just be treated the same, removed from core, perhaps creating a separate transition repository for those who want to upgrade but are tied up to it (if that's possible). Documentation and mentions should be removed as soon as possible. The best experience for newbies would be if we kept a really short tutorial to using the new reactnavigation in the documentation. It's okay to be opinionated and link to the site. Regarding NavigatorIOS, I personally think it should be kept in the core. It only wraps the native component and does not try to provide a framework for navigation, right? I'm not using and have no plans to, but I find it nice that the basic native components are available without involving a 3rd party. Just my two cents. |
If I'm starting a new react native project, would you recommend using React navigation since that is what will be officially used by react-native? |
I'm a bit worried by this, as much as I like React Navigation. I feel like React Navigation is still a very young project, although it is based on NavigationExperimental. I don't think React Navigation has been adopted and is used heavily by the community, I'm not sure how much Facebook or Exponent is using it internally. This is why I think it's a very risky and biased decision to say that React Navigation is "the one". Navigation is one of the core parts of every application and I'm not sure if it's best to recommend the library (make it an official RN solution) which is not mature. I quite like the way React deals with 3rd party libraries and do not recommend any of the solutions. There is no recommended way of doing navigation on the web, not a one way of managing the state, etc., and I feel like React Native is becoming very opinionated. I'd like to know what others think about it. |
Now that I agree with @knowbody that is important for React Native to stay unopinionated and to not suggest any solution to "navigation problem" in particular. Now, that we have more players in the game, all approaching problem from a slightly different perspective, it is worth describing most popular alternatives along the tradeoffs they come with. That said, there would be enough solutions for those looking for portability from web (react-router), those looking for benefits of JS navigation (react-navigation) and those that want native user experience and nuances to be in place (native-navigation). I would suggest:
It is more or less similar with what's been already suggested here. |
Deprecating Navigator risks to be not that much welcomed: all applications using it now since the beginning... But we understand that FB can't waste time maintaining all just for our smiles. So in short term I conclude I have to use |
My opinion: Navigation is still painful. The new
I wish there was a
Which make them much more difficult to maintain. In my opinion, the navigation can just be a wrapper to native navigation (for example in Android, using activities or fragments) and that is it. |
Edit: Since I originally wrote this in April, there have been some significant improvements to React Navigation. I now believe it's mature enough to use in most scenarios. I want to add another voice to the call of at least delaying the removal of the bundled Navigators, including NavigationExperimental. While the latest batch of navigation options are really exciting, they're relatively immature. Airbnb's Native Navigation library is, according to Airbnb themselves, not production ready: React Navigation is certainly further along, but is still quite short of stability. This useful roadmap to version 1 has not been updated in 20 days, and none of the linked issues have meaningful updates. Any that have PRs attached have not been updated in at least 20 days. I personally really like React Navigation but it's very clearly an in-progress project. None of this would be a problem if the inbuilt navigation options weren't being removed with the expectation that RN will be able to easily take over for everyone. While I'm sure this will soon be the case, it's definitely not true yet, and I think it's setting us up for failure. There's no need to rush into removing useful and non-problematic portions of React Native until there are stable and feature-parity replacements available. Removing NavigationExperimental from the docs and adding the deprecated warning will have scared off all new users, and there's no harm in leaving it in until React Navigation is at least in a proven, stable state. |
Both |
Having used react navigation in a significant application I finally would choose it over Navigator even if the latter were not deprecated. Yes there is still some hard word to make it production friendly but as far as I experienced it is more often a lack of documentation (for some use cases / situations) and examples. |
Navigation is a big component of any well built mobile application. The React Native team punting this to third party developers is not a good omen. At the very least, it seems like it would be useful to provide a migration guide for users who have built applications on top of Navigator, rather than just removing it from the documentation. |
I'd be really curious to know if facebook (or whoever was in charge of the development) is inclined to support |
I totally agree with @vonovak I was just looking at the repo again and it seems that it is currently totally standing still when it comes to commits. And its over 830 open issues and 84 open PRs at the moment.. I bet there are enough motivated people to take over if there is lack of manpower behind managing this? What's the plan? |
@hramos can you perhaps comment on the future of |
I would like to say the contrary (I really tried these few months):
Sorry this isn't reliable at all... Why not including better working navigators like Wix one in the official documentation. |
We already link to several navigation libraries in the docs, including Wix's. The docs are open source and available in this repo. Anyone can send a PR and propose changes to the docs with improvements. |
Closing this out since React Navigation 1.0 was released, Navigator and NavigationExperimental have been removed from this repo, and just NavigatorIOS is left. |
Navigator was superseded by NavigationExperimental and finally by React Navigation. To increase the focus on core components and direct PRs to the right place, we may want to deprecate the old navigator libraries.
A possible plan is to move Navigator out into a separate repo and publish it to npm. We'd give people at least one month or maybe two to change their requires to use this new package (very easy change for people) and in the meantime print a warning if you access Navigator via react-native. After the deprecation period we would delete the code from RN.
Some questions:
Who maintains the separate repos?
Are they synced to FB via shipit? Or fork?
Do we do the same for NavigationExperimental, or do we expose NavigationExperimental's core via React Navigation? Probably makes sense to keep this code in sync with FB since it is actively used.
Do the same for NavigatorIOS? React Navigation is quite good and will get better as people fine tune it and Fiber helps it and it's already viable for production apps by companies with the reach of FB or smaller -- the main thing is it's not exposing Apple's UI by still can provide a good experience when used right.
The text was updated successfully, but these errors were encountered: