20171127-afternoon
previous (and first) react exercise: react-flight-booking
yarn install
- At its most simplest, a React component is a function that returns an HTML element
- The React component function takes key-value pairs called 'props' — very similar to HTML attributes. However, the keys can be named whatever you like.
- React components can also render (return) other React components
- You can bundle up a lot of power in one React component — multiple HTML elements for example
- Things nested inside a rendered component become accessible as the
children
prop - React component can dynamically change what HTML tag it will use — e.g. use
<a>
whenhref
prop is passed, otherwise use<button>
- String interpolation is great for punching prop values into class names
- Add components for Alert
- Add components for Card
- Add components for Forms and Fields
This project was bootstrapped with Create React App.
Below you will find some information on how to perform common tasks.
You can find the most recent version of this guide here.