The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

React Router: Router, Route, and Link

React Router: Router, Route, and Link

2:54
In this lesson we'll take our first look at the most common components available to us in react-router; Router, Route, and Link.
Watch this lesson now
Avatar
egghead.io

In this lesson we'll take our first look at the most common components available to us in react-router; Router, Route, and Link.

Avatar
Anda

Which snippets library do you use in atom?

In reply to egghead.io
Avatar
Itai

Joe, why didn't you have to use parenthesis around the Links function?

Avatar
Joseph

"return" is not required in ES6 arrow functions, but rather inferred after the fat arrow. If I had been using an implicit return statement I would have used parens.

const Links = () => "Links" // returns "Links"
const Links = () => {
    return "Links" // implicit return returns "Links"
}
const Links = () => {
    return (
         "Links" // implicit return returns "Links"
    )
}
In reply to Itai
Avatar
prabhuignoto

i am having trouble running the examples with react router v4

Avatar
Bogdan Martinescu

Outdated with React Router v4... Joe should update this course maybe

Avatar
blopez2010

That would be a good idea, I'm struggling with this issue "warning.js:36 Warning: Failed prop type: The prop history is marked as required in Router, but its value is undefined." and also library versions are very old!!

In reply to Bogdan Martinescu
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?