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

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?