Skip to content
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

Why is NavigationExperimental part of react-native core? #6184

Closed
akupila opened this issue Feb 27, 2016 · 37 comments
Closed

Why is NavigationExperimental part of react-native core? #6184

akupila opened this issue Feb 27, 2016 · 37 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@akupila
Copy link

akupila commented Feb 27, 2016

The work done by @ericvicenti is great but the API is still quite unstable, documentation missing etc. I think adding another navigator in addition to Navigator and NavigatorIOS will confuse people more than help them. As NavigationExperimental was pulled in from ericvicenti/navigation-rfc i'm sure there's a reason for this?

Pulling out NavigationExperimental into it's own repo, for instance facebook/react-native-navigator-next, has a couple benefits:

  • Allows API, docs and examples to stabilize independent from react-native
  • Issues & pull requests can be tracked separately, generally less clutter in main repo
  • Potentially less confusion for people looking for a navigation solution, having it part of core (and in UIExplorer) makes it currently look like an officially blessed way of doing things

Navigation is a such a core part of any app and i love the thinking that's gone into NavigationExperimental. Would be great to get NavigationExperimental to a good solid place and only then recommend it as the way to do navigation.

@eysi09
Copy link

eysi09 commented Feb 27, 2016

I completely agree. I've put a lot of effort into getting the Navigator component to work the way I want it to. I decided to stick with that component since I assumed it would be consistently maintained and improved by the core team and community. Now I'm not sure whether that was a good move or whether I should start worrying about switching to the NavigationExperimental version. Navigators are a core part of any app as @akupila mentioned and replacing one Navigator for another in a non-trivial app can be huge amount of work.

Should I commit on the Navigator component and continue development with it's API in mind or should I avoid putting much effort into navigation related logic and be prepared to switch in the near future?

@satya164
Copy link
Contributor

@akupila

The work done by @ericvicenti is great but the API is still quite unstable, documentation missing etc

Even if it's in the main repo, it's named as NavigationExperimental, which should be enough to imply that's it's experimental. Of course, before finalizing it, we will need to improve the docs and all.

IMO putting it to a separate repo will increase the maintenance cost rather than decreasing it. And we'll need to have tooling for 2 different repos.

@eysi09

Your reasons are completely different I think. I think we can move the current Navigator to a separate repo when NavigationExperimental becomes the default navigator. Same goes for NavigatorIOS. People who are already happy with the current navigator shouldn't need to change anything.

cc @ericvicenti

@geirman
Copy link
Contributor

geirman commented Feb 27, 2016

I decided to stick with that component since I assumed it would be consistently maintained and improved by the core team and community.

@eysi09 Doesn't appear to be a safe assumption. Refer to the Navigator Comparison Docs which state...

Facebook is dropping support for Navigator and will focus on NavigationExperimental from now on

@rclai
Copy link
Contributor

rclai commented Feb 27, 2016

I was under the impression that it was going to replace the current Navigator given the way the Product Pain post was titled? Can you guys clarify on this?

@eysi09
Copy link

eysi09 commented Feb 27, 2016

@geirman You're right, thanks. That comment is only 22 hours old though, wish I would've seen it last week. Is there a rough estimate for when it will become the default? And is it production ready at the moment (apart from the missing docs)?

@satya164
Copy link
Contributor

@eysi09 Using it in prod and it's working fine. But the API is still in flux. So may be hold off a bit.

@akupila
Copy link
Author

akupila commented Feb 29, 2016

I think my biggest issue here is that it's a bit unclear where discussion or questions should happen. Previously an issue could be opened on the ericvicenti/navigation-rfc/ repo but now i just feel bad doing it as there are so many open issues in the main repo already. Same thing goes for community contributed docs updates, examples etc, what's a good approach for that now?

@satya164

IMO putting it to a separate repo will increase the maintenance cost rather than decreasing it. And we'll need to have tooling for 2 different repos.

As NavigationExperimental doesn't depend on any native code (just Animated which already is in core) i don't think the tooling overhead is that bad. Sure there's some with setting up tests etc but that applies to any 3rd party library. In a sense this is very similar to reactjs/react-router which happily can live outside of React core.

All this said I think React Native is a bit different that React; an app without navigation is basically non-existent in the native world so eventually it'd be good to have a core team blessed router part of core and UIExplorer. I just don't think NavigatorExperimental is mature enough for that yet and keeping it part of core slows down progress. Happy to be proven wrong!

@satya164
Copy link
Contributor

I think my biggest issue here is that it's a bit unclear where discussion or questions should happen. Previously an issue could be opened on the ericvicenti/navigation-rfc/ repo but now i just feel bad doing it as there are so many open issues in the main repo already. Same thing goes for community contributed docs updates, examples etc, what's a good approach for that now?

Discussions should happen in the main repo. Keeping it in the main repo means more people will try it, rather than only few people who discover that another repo exists.

@ericvicenti should the other repo be deleted/or issues could be disabled there?

As NavigationExperimental doesn't depend on any native code (just Animated which already is in core) i don't think the tooling overhead is that bad. Sure there's some with setting up tests etc but that applies to any 3rd party library. In a sense this is very similar to reactjs/react-router which happily can live outside of React core.

There is a lot of tooling needed, bots for importing PRs to phabricator, bots to comment on issues, running tests on CI, syncing the code into FB codebase etc. Even now it's pretty huge work load to keep everything working properly and fix bugs. Splitting it into two repos will be immensely difficult to manage.

Also after it's finished, when we've documentations, examples etc., it'll be much harder to integrate them back.

I just don't think NavigatorExperimental is mature enough for that yet

NavigatorExperimental is being used inside Facebook. It might not be mature, but it works pretty good right now. Also it's named as Experimental, so I think its obvious that the API is not stable.

keeping it part of core slows down progress.

I don't think it slows down the progress. Why would you think so?

Note that all of these are my personal opinion. I understand why you're saying this, but I don't think it makes much sense in context of React Native.

@akupila
Copy link
Author

akupila commented Feb 29, 2016

All valid points. I didn't consider the depth of the tooling needed as i'm not all that familiar with the build process & CI here.

I guess it makes sense to fix forward rather than reverting back and keeping everything in one place is definitely a good thing for anybody in the future googling things. Would be nice to clear some confusion here though, perhaps by adding something about NavigatorExperimental to Navigator Comparison, maybe merging stuff from ericvicenti/navigation-rfc/blob/master/Docs/NavigationOverview.md? I'm also curious to know if there's an ETA for this to be finalized? Or at least for some basic documentation to show up?

@ericvicenti
Copy link
Contributor

Thanks for the constructive discussion around this, folks. I agree that we're not in an ideal state. @satya164 is right, we have it this way for now for maintainability reasons. It is much easier for us to open-source RN modules this way because of shared testing, code syncing and versioning infrastructure. We also want to make it clear that NavigationExperimental is going to fully replace Navigator (which is already in RN core).

I'm working on documentation today and I hope to get some of it landed in the main RN docs by tomorrow. I know its a big concern for adopters!

I agree with @akupila about the biggest problem- that GH issues inside the RN repo will not scale well. At the moment I am happy to respond to issues on the RFC repo, or when people tag me on issues in RN. Otherwise I'm afraid that I will miss things. Does anybody have any suggestions? I could close issues in the other repo, but it still might be a useful channel. Maybe we can add a label for this and configure a bot to tag a few of us Nav-heads?

cc @vjeux , there are a lot of shared concerns with this and Animated.

@vjeux
Copy link
Contributor

vjeux commented Feb 29, 2016

For animated, work on a next version is being done on https://github.com/animatedjs/animated in a very ad-hoc way. Unsure if it's a path we should follow

@rclai
Copy link
Contributor

rclai commented Feb 29, 2016

Thanks for confirming and clarifying. Can I ask questions about NavigationExperimental here?

@geirman
Copy link
Contributor

geirman commented Feb 29, 2016

Would it make sense to start a #Navigation or #NavigationExperimental channel in Discord's reactiflux? Might cut down on the random, one off questions... leaving github issues focused on work items.

@ericvicenti
Copy link
Contributor

Ok, lets do this for now:

Questions on Usage:

Post on StackOverflow and tag @ericvicenti . Long term we should create a tag for this that people can subscribe to (I would do it but I don't have enough SO reputation)

Bug Reports and API feedback

Post issue in react-native and tag me (@ericvicenti). Title should include "NavigationExperimental"

OR:

Post issue in https://github.com/ericvicenti/navigation-rfc/issues

Neither option will be appropriate long term. I'm open to ideas on how to fix this!

Discussion

We just opened a new discord channel. Feel free to drop in here and discuss: https://discordapp.com/channels/102860784329052160/154015578669973504

@sisyphsu
Copy link

sisyphsu commented Mar 9, 2016

I'm really hurt by NavigationExperimental, Poor document, Too complex, Missing feature.
I have spend one week on this, maybe it's too early to merge it into master.

@ericvicenti
Copy link
Contributor

  • My apologies for the sparse documentation. The work-in-progress is available here: https://github.com/ericvicenti/navigation-rfc/tree/master/Docs
    • Contributions would be very welcome!
  • Is there some complexity that you would like to see removed, without sacrificing flexibility?
    • If so, file an issue and explain how we can simplify things
    • You may be interested in higher-level components like the new NavigationCardStack, which cuts down on the boilerplate for simple apps.
  • We can't possibly support every feature, but now it is easier to add your own features.
    • If you have questions on how to do something with the API, tag me on StackOverflow.
    • Any specific features that you think should be built in? File that as an issue or on ProductPains.
  • Lastly, this is "Experimental" for a reason- it may not be ready for everybody.
    • If you know of other libraries that cause you less pain, feel free to use them and tell us how they compare!

@pie6k
Copy link

pie6k commented Mar 10, 2016

Are you able to tell anything about when to expect it to be "less experimental"? I'm starting new project, I have a lot of pain understanding current Navigator or finding some good docs about it and I'm not sure what to do now.

@ericvicenti
Copy link
Contributor

NavigationExperimental is the supported option going forward. We will remove the 'experimental' name once the API changes have died down and we've adopted it in Facebook apps.

@pie6k
Copy link

pie6k commented Mar 10, 2016

If I'd start using it now, are you able to tell how big potential api changes could be? Could it be something that will require big effort to fit into potential new one?

@ericvicenti
Copy link
Contributor

The API changes will be tiny in comparison to the difference between Navigator and NavigationExperimental.

For example, the reducer API may change or get more advanced, but your views would remain unaffected

@akupila
Copy link
Author

akupila commented Mar 11, 2016

I think adding NavigatorExperimental docs to the official docs would help with some of the pains here. The reason i opened the issue in the first place is very similar to @adampietrasiak, starting a new project and not really knowing where to start with navigation. If the code is part of the main repo, doesn't it make sense to keep the docs in the main repo too, instead of ericvicenti/navigation-rfc?

@5amfung
Copy link

5amfung commented Mar 19, 2016

I hope there's better documentation. I have to look at the example code to understand but even the example is not easy to digest.

@mattryles
Copy link

@5amfung this maybe helpful. https://github.com/jlyman/RN-NavigationExperimental-Redux-Example

@stereodenis
Copy link
Contributor

how to migrate from Navigator to NavigationExperimental?

@ericvicenti
Copy link
Contributor

I migrated the f8 app from Navigator to NavigationExperimental: fbsamples/f8app#37

@stereodenis
Copy link
Contributor

@ericvicenti thnx!

@ghost
Copy link

ghost commented Jun 16, 2016

Just found this page, because I was looking for documentation / information for the NavigationExperimental API from official sources.

It's totally clear, that an ExperimentAPI can change very often even without proper versioning. But we need at least some kind of official source to look at the changelogs to this special topic.

Because I am starting a new application right now, I would like to know, which Navigation solution to choose. I guess the direction goes clear to the new one. So, could someone from the core team tell, what the plans are to release a first draft of documentation on this?

This would be really helpful!

@alexprice1
Copy link

@dropfen my philosophy is, it is really terrible technical debt to work with a technology that's about to be deprecated.

The only thing that could be worse, is working with another technology that is so alpha that it is a moving target.

My suggestion is, unless you really want to shape the future of Navigation Experimental, stick with the old navigation system.

@Alanz2223
Copy link

@ericvicenti Its been a couple of months since this discussion took place, i am now in the process of beginning work on a new, midly complex app, and need a navigation solution. Is NavExp at the point where you would recommend it over the original one?

@ericvicenti
Copy link
Contributor

Yep, absolutely. Compared to Navigator, it is far more maintainable and hackable. We are adopting it for a few things at Facebook. It is still changing in small ways, but it is the supported navigation solution moving forward.

@mouneyrac
Copy link

Hello Eric (@ericvicenti),
is there an "expected" React Native version for the NavigationExperimental renaming (i.e. getting out of experimental)?

The Github tracker is full of issues and I have difficulties to understanding what is left to do for the NavigationExperimental. Is a "big vision" Trello/Asana/Jira/... progress tracker available somewhere (if it is public of course)?

cheers and thank you for your work :)
Jerome

@mouneyrac
Copy link

Hi, I answer my previous post, the RN team published a blog post about releasing a roadmap: http://facebook.github.io/react-native/blog/2016/11/08/introducing-button-yarn-and-a-public-roadmap.html - basically NavigationExperimental is going to be deprecated in favor a new solution which would be excellent :) I also saw that there is an interest for the new navigation to work on react-native-web which would be wonderful for the react-native-web project :) Cheers, Jerome.

@rodrigoruiz
Copy link

So, which navigator should we use now to easily move to the new solution when it comes?

@ghost
Copy link

ghost commented Nov 19, 2016

@rodrigoruiz
Copy link

I'm guessing it has native code dependencies right? so I would be able to use with Exponent?

@ericvicenti
Copy link
Contributor

ericvicenti commented Nov 19, 2016

For now, I would recommend using ExNavigation, which provides a bunch of features on top of NavigationExperimental. It will be pretty easy to switch from ExNav to the new solution.

@sdg9
Copy link

sdg9 commented Feb 17, 2017

Hopefully this will save ya'll 10m of google searching.
mkonicek's comment on product pains Jan 26, 2017 says to check out React Navigation

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
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.
Projects
None yet
Development

No branches or pull requests