Rewrite of Day 1 to use modern React (#294)

* update to hooks

* more class to function

* cleanup

* finish ts final

* update html lesson

* add lessons page

* clean up

* move getters into context

* adding type

* fix bug

* step 5 cleanup

* init final pass

* text tweak

* fix ternaries

* readme cleanup

* fixed root readme
This commit is contained in:
Micah Godbolt
2022-01-13 09:22:50 -08:00
committed by GitHub
parent 4998c158d2
commit 7cea32428e
60 changed files with 923 additions and 929 deletions

View File

@@ -6,13 +6,13 @@ If you don't already have the app running, start it by running `npm start` from
## TodoFooter
1. Add a TodoFooter component in the `components` folder, copying over the `<footer>` tag and all of its children from `TodoApp.html` in the `step1-05` folder. This component could be a function or class.
2. Remove any `onclick` properties, and change `class` to `className`
1. Add a TodoFooter component in the `step1-05/exercise/src/components` folder.
2. Create a react component that returns the footer markup from `step1-05/TodoApp.html`. Make sure to import React, export the component, and change `class` to `className`.
## TodoList
1. Add a TodoList component like you did with the footer. This could also be function or class.
2. Import TodoListItem and add four of them inside of the `<ul>`
1. Add a TodoList component like you did with the footer.
2. Import TodoListItem and add four of them inside of the `<ul>` (we'll be using live data later)
3. Bonus points for using a [`for`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration) loop or using [`map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) to create 4 list items based on the array `[1,2,3,4]`
## App