In this lesson we'll take our first look at the most common components available to us in react-router; Router, Route, and Link.
Joe, why didn't you have to use parenthesis around the Links function?
"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"
)
}
i am having trouble running the examples with react router v4
Outdated with React Router v4... Joe should update this course maybe
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!!
well this does not work anymore