Reading 29 - AvreyBrown-401-advanced-javascript/seattle-javascript-401d32 GitHub Wiki
Here’s an example of a stateless function that is used to create a component. Again, since this is a stateless function, there is no 'this' keyword so just use props.children
const Picture = (props) => { return (
This component contains an that is receiving some props and then it is displaying {props.children}.
Installation React Router has been broken into three packages: react-router, react-router-dom, and react-router-native.
You should almost never have to install react-router directly. That package provides the core routing components and functions for React Router applications. The other two provide environment specific (browser and React Native) components, but they both also re-export all of react-router's exports.
npm install --save react-router-dom
The Router When starting a new project, you need to determine which type of router to use. For browser based projects, there are and components. The should be used when you have a server that will handle dynamic requests (knows how to respond to any possible URI), while the should be used for static websites (where the server can only respond to requests for files that it knows about).
Usually it is preferable to use a , but if your website will be hosted on a server that only serves static files, then the is a good solution.