Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript React Router Basics Getting Started with React Router Expand Your React Skills

14,136 Points

What version of React router are we using for this course?

The API for react router seems to have changed significantly for v4. As I would prefer not to learn a soon to be deprecated API does this course use v4? From a quick look it seem to be but doesn't use things list <BrowserHistory> and instead is using history= {hashHistory}. Have some things changed around this since the course was published?

1 Answer

Christian Tucker
Christian Tucker
Courses Plus Student 1,987 Points

This course is currently using v2 of the react-router library. It's definitely outdated in terms of version, however there's not any breaking changes moving to v3. The v2 and v3 documentation is actually grouped together on the GitHub which I've linked to below.

This can be found in the package.json file in the project files downloadable from this lesson

"react-router": "^2.7.0"

You can view the documentation for the react-router api >> here <<

You will also see that browserHistory and hashHistory are both available. Here's an excerpt from the docs.


browserHistory uses the HTML5 History API when available, and falls back to full refreshes otherwise. browserHistory requires additional configuration on the server side to serve up URLs, but is the generally preferred solution for modern web pages.


hashHistory uses URL hashes, along with a query key to keep track of state. hashHistory requires no additional server configuration, but is generally less preferred than browserHistory.

14,136 Points

ok thanks for the confirming