In this assignment we will start to use React components. The goal of this assignment is to compose generic smaller components into larger more complex components. You will have to think about the information passed (props) from the larger parent components down to their child components. The components we will be creating are a login form, pager, and radio buttons. Below are some examples of how these might look:
- Login form example
- Pager example
- Radio buttons example
- Layout the login form, pager, and radio buttons by composing generic components (I see 2-3 generic components you could make) that will be located in
src/components
. - Figure out what props you want to pass down to each component. Example: let's say we created a button component some, but not limited to, of the props that I might pass down could be a enable/disable flag, a way to change the color, and a button size.
- Feel free to add custom styling any new generic components you want.
- Deploy your app and insert the url here: https://prof-tejera.github.io/homework-3-car1sle/
- Pager: If you have hardcoded a pager that works 1 to 10, then how might we modify it to be a bit more generic? What props can I pass in that will make the component more configurable?
- Radio buttons: If you hardcoded "Apple", "Pear", and "Orange", then how might you modify it to take in an array of button configurations? What information might we need to determine if a button is active?
It is required that you have node
and npm
installed. In the project directory, you will run:
npm i && npm start
The app will start in the development mode. Open http://localhost:4000 to view it in the browser. The page will reload if you make edits. You will also see any lint errors in the console.