Live data from Hacker News

React Router: Declarative Routing for React

reacttraining.com

1–10 of 68 posts

Re: React Router: Declarative Routing for React

#4
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.

Neither were we >.< but we were learning React along with everybody else! You'll love this version.

Re: React Router: Declarative Routing for React

#5

Been using V4 since they released alpha and it really is a great piece of software. Great work Michael and Ryan.

React Router V4 has been a pleasure to work with for me as well, and I've used it in a couple of projects that have some fairly complex routing.

Re: React Router: Declarative Routing for React

#8

I couldn't find it on the website, is there a detailed list of the changelog for this beta? Looks like some really great changes were made, but would love to see specifics.

We're working on an upgrade guide, but in short, it's a completely different library. Major difference is that routes are actual components that are actually rendered, where before they just had their props stripped and plugged into the routing machine. Now your routing is composed like the rest of your react app.

Re: React Router: Declarative Routing for React

#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

Re: React Router: Declarative Routing for React

#10
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 and history?

Post reply on HN