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

Y B
Y B
14,136 Points

React router 4 and Match

In Guil's Nodevember talk mentioned in the end of the teacher's notes for the React Router course he mentions that the <Match> component is the default replacement for <Route>. However the official v4 docs (I think these are official?) seem to still use Route and not use <Miss> for a 404 etc... . https://reacttraining.com/react-router/api

Are the docs just outdated (or Guil's talk)?

1 Answer

Guil Hernandez
STAFF
Guil Hernandez
Treehouse Teacher

hey Y B,

<match> and <miss> were removed after the v4 alpha release. In v4 latest, <match> is once again <route>, with the path and exact props. <miss> was replaced with the <switch> component.

Y B
Y B
14,136 Points

Ah brilliant thanks for confirming. (the difficulties of working with an alpha). :)