Live data from Hacker News

React Router: Declarative Routing for React

reacttraining.com

11–20 of 68 posts

Re: React Router: Declarative Routing for React

#12
post #9

The docs are super good. I love the "embedded browser" that shows how it works. Shameless self plug: our book [1] has a whole chapter on Routing in React with this new v4 router. After you've finished reading the docs, if you want a tutorial style walk-through of this router v4, we build a Spotify-type clone over the course of 75+ pages. [1]: https://www.fullstackreact.com

I looked at your site. If you had video screencast that I could follow along. I would have paid for it.

Re: React Router: Declarative Routing for React

#14

i like the power of the new API but i'm not sure i'm entirely sold on the declaration syntax. adjacent tags which specify things that may appear in the same place depending on the route seems a bit strange conceptually to me. i'll have to play around with it on a real-world project to see how it feels in practice. i didn't see it mentioned in the docs, but does the new version fix the awkward handling of scrolling an…

browsers are handling that now https://majido.github.io/scroll-restoration-proposal/history...

Re: React Router: Declarative Routing for React

#16
post #13

The website is broken on mobile - elements overlap and content is not visible.

Slightly off topic, but do you find that docs really need to be mobile friendly? I'd personally rather the developer focuses on the actual project and all those concerns rather than a perfect responsive docs page. Esp when assuming most of these docs are eventually translated into markdown on github which are then mobile friendly.

Re: React Router: Declarative Routing for React

#17
post #3

I definitely like the way they decided to move in the latest version. I never was comfortable with the previous API -- it just didn't feel right, and it was kind of restrictive.

Same here... It just shows how React isn't mature yet and also the scope for the future.

Re: React Router: Declarative Routing for React

#18

Could someone comment about how this compares with other projects like: https://github.com/react-community/react-navigation and https://github.com/facebook/react-native/blob/master/docs/Us... ? Awesome docs, BTW!

react-navigation will supersede all existing navigator solutions in React Native core (Navigator/NavigationExperimental).

React Router v4 is building a react-native integration to show that it is capable of working on Native. It's centered around URLs so it's attempting to make Deep Linking into your application easier, as well potentially re-using the same navigation on the web.

That being said react-navigation can do both of those things as well and is fully supported by react-native core contributors.

Re: React Router: Declarative Routing for React

#20

Could someone comment about how this compares with other projects like: https://github.com/react-community/react-navigation and https://github.com/facebook/react-native/blob/master/docs/Us... ? Awesome docs, BTW!

Difference is the API. React Router is a 100% declarative components, rather than configs and imperative actions.
Post reply on HN