React-native: Deprecating Navigator and React Navigation

Created on 28 Jan 2017  路  16Comments  路  Source: facebook/react-native

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.

Locked Discussion

Most helpful comment

My opinion: Navigation is still painful.

The new native-navigation it is still very, very green. Not produciton ready, quite coupled to Airbnb (like bottom navigaiton) and not even giving Android default transitions. I feel that for a native solution, the wix/react-native-navigation is much more mature (specially when 2.0 comes out but it's taking much more time than expected -> see reasons below).

react-navigation is promising but it is starts growing in number of issues and unreviewed PRs. Probably because it seems to me there is not a dedicated team/company supporting it.

I wish there was a NavigationAndroid the same way there is a NavigationIOS and then just an API on top if to manage both. The main issue I see in all navigation libraries is that they try to solve all these:

  • TopBars
  • TabBars
  • BottomTabs
  • TopTabs
  • Drawers
  • SharedElementTransitions
  • etc

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. push, pop, replace and deep linking. Wouldn't it be easier to maintain? I feel all solutions are bloated.

All 16 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 just don't think that there should be official way of doing navigation, because it discourages others to use other navigation solutions.

I'd like to know what others think about it.

Now that native-navigation by Airbnb has been announced at React Conf, I believe we might want to change the original intent of suggesting react-navigation as the recommended solution.

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:
1) Deprecate all NavigatorIOS, Navigator and NavigationExperimental by moving them out to a separate repositories. Special instalation instructions should be added when neccesary (e.g. NavigatorIOS requires native modules to be present)
2) For next couple of versions, print a warning that these modules were removed and either upgrade or additional install is required. React Native should pull these from npm for time being
3) Include a Navigation page in documentation describing available alternatives

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 react navigator if I want to save rewrite time for my new apps?

My opinion: Navigation is still painful.

The new native-navigation it is still very, very green. Not produciton ready, quite coupled to Airbnb (like bottom navigaiton) and not even giving Android default transitions. I feel that for a native solution, the wix/react-native-navigation is much more mature (specially when 2.0 comes out but it's taking much more time than expected -> see reasons below).

react-navigation is promising but it is starts growing in number of issues and unreviewed PRs. Probably because it seems to me there is not a dedicated team/company supporting it.

I wish there was a NavigationAndroid the same way there is a NavigationIOS and then just an API on top if to manage both. The main issue I see in all navigation libraries is that they try to solve all these:

  • TopBars
  • TabBars
  • BottomTabs
  • TopTabs
  • Drawers
  • SharedElementTransitions
  • etc

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. push, pop, replace and deep linking. Wouldn't it be easier to maintain? I feel all solutions are bloated.

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:

[We] will not consider the library to be "production ready" until we ourselves are using it in production.

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 NavigationExperimental before or React Navigation now can hardly handle high order navigation or customize needs.The Navigator has been removed from official document and the React Navigation is really weak though.

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 react-navigation in the long-term, since it doesn't seem to be case when I look at the commit frequency and the number of unreviewed PRs. I think react-navigation deserves a lot more attention from fb than it currently gets, considering how important navigation is in just about any app.

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 react-navigation and if fb is going to get more involved in it (if you have the information)? Thanks!

I would like to say the contrary (I really tried these few months):

  • but considering my experiences with react-navigation I now even miss the old school deprecated Navigator.
  • I spend far more time having the same application working as expected

Sorry this isn't reliable at all...

Why not including better working navigators like Wix one in the official documentation.
It seems like more robust?

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.

Was this page helpful?
0 / 5 - 0 ratings