Skip to content

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

Closed
ide opened this issue Jan 28, 2017 · 16 comments
Closed

Deprecating Navigator and React Navigation #12103

ide opened this issue Jan 28, 2017 · 16 comments
Labels
Resolution: Locked This issue was locked by the bot. Type: Discussion Long running discussion.

Comments

@ide
Copy link
Contributor

ide commented Jan 28, 2017

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.

@scarlac
Copy link
Contributor

scarlac commented Mar 3, 2017

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.

@jasan-s
Copy link

jasan-s commented Mar 6, 2017

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?

@knowbody
Copy link
Contributor

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.

@grabbou
Copy link
Contributor

grabbou commented Mar 14, 2017

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.

@MacKentoch
Copy link
Contributor

MacKentoch commented Mar 21, 2017

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?

@ferrannp
Copy link
Contributor

ferrannp commented Mar 21, 2017

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.

@JodiWarren
Copy link
Contributor

JodiWarren commented Apr 6, 2017

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.

@Obooman
Copy link

Obooman commented Jun 7, 2017

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.

@MacKentoch
Copy link
Contributor

MacKentoch commented Jun 7, 2017

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.

@MattFoley
Copy link

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.

@vonovak
Copy link
Collaborator

vonovak commented Jul 31, 2017

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.

@hramos hramos added the Type: Discussion Long running discussion. label Jul 31, 2017
@wwwdata
Copy link

wwwdata commented Aug 8, 2017

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?

@vonovak
Copy link
Collaborator

vonovak commented Aug 15, 2017

@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!

@MacKentoch
Copy link
Contributor

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?

@hramos
Copy link
Contributor

hramos commented Sep 11, 2017

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.

@ide
Copy link
Contributor Author

ide commented Feb 7, 2018

Closing this out since React Navigation 1.0 was released, Navigator and NavigationExperimental have been removed from this repo, and just NavigatorIOS is left.

@ide ide closed this as completed Feb 7, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Dec 11, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Dec 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot. Type: Discussion Long running discussion.
Projects
None yet
Development

No branches or pull requests