- stars
- 32
- watchers
- 17
- forks
- 3,685
- open issues
- 173
- Last updated
- 08/23/2023
We're going to practice building a stateful class component with this project. Even though hooks are gaining popularity among react developers, class components are going to be around for a long time. It's imperative that you get use to class components, and feel comfortable working with class components since you'll most likely need to work with them if you are hired to work on a React app.
[ { task: 'Organize Garage', id: 1528817077286, completed: false }, { task: 'Bake Cookies', id: 1528817084358, completed: false } ];
task field is the todo title that will be shown to the user.completed field should default to false and will be the field that we toggle when we complete a todo.id field is a unique Time Stamp that will be assigned by Date.now().<firstName-lastName>.<firstName-lastName> branch, committing changes regularly.<firstName-lastName>.Follow these steps for completing your project.
<App /> will hold all the data needed for this project. It will also be the container for your Todo Components.
<App />.handler functions should live here on <App />.<TodoList /> receives your Todos array and iterates over the list generating a new <Todo /> for each element in the array.<Todo /> is a component that takes in the todo data and displays the task to the screen.<TodoForm> will hold your input field and your Add Todo and Clear Completed buttons.
Enter or click on the Submit Button to add a todo to your list.false to true.
.filter will be your best friend here. When a user clicks on the Clear Completed button call your handler function that will filter out any todos that have the completed flag toggled to true.Persist your data in window.localStorage() hint: you may have to pass your data to a stringifier to get it to live inside the localStorage() of the browser. This will cause it to persist past the page refresh.
Search Functionality Add a input bar that allows you to search through your tasks and only show the ones that match the search input.
Hosting Create a Netlify Account and follow the tutorial on how to host your shiny new todo app on the world wide web.
<firstName-lastName> Branch into main (student's Repo). Please don't merge your own pull request