You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
4
4
5
-
## Introduction
6
-
7
-
- Your job is to write the components to complete the Todo List application.
8
-
- Your todo list should be fully functional and you should design it however you'd like. Feel free to get creative here. I have supplied a gif for you to see what the MVP functionality is.
9
-
10
-

11
5
12
-
- Your todo data should be an array of objects that look a lot like this:
6
+
## Objectives
7
+
- Build class components from scratch
8
+
- Defining application state
9
+
- Defining component state
10
+
- Connecting state changes to components
13
11
12
+
## Introduction
13
+
In this project you will build an application that allows for todos to be added, toggle and checked off. Please use ALL CLASS BASED COMPONENTS when creating this application and use the Guided project as a model. This application should:
14
+
- Hold all todos in state within the App.js component. That todos should look like the following:
14
15
```js
15
16
[
16
17
{
@@ -25,30 +26,24 @@ We're going to practice building a stateful class component with this project. E
25
26
}
26
27
];
27
28
```
29
+
- Allow for a todo to be toggled when clicking on an item.
30
+
- Allow for a todo be be added when submitting the todo form component.
31
+
- Allow for completed todos to be cleared when clicking the clear completed button.
28
32
29
-
- The `task` field is the todo title that will be shown to the user.
30
-
- The `completed` field should default to `false` and will be the field that we toggle when we complete a todo.
31
-
- The `id` field is a unique `Time Stamp` that will be assigned by `Date.now()`.
32
33
33
-
## Instructions
34
+
***Make sure to complete your tasks one at a time and complete test each task before proceding forward.***
34
35
36
+
## Instructions
35
37
### Task 1: Project Set Up
38
+
*[ ] Create a forked copy of this project.
39
+
*[ ] Clone your OWN version of the repository in your terminal
40
+
*[ ] cd into the project base directory `cd web-module-project-lifecycle`
41
+
*[ ] Download project dependencies by running `npm install`
42
+
*[ ] Start up the app using `npm start`
36
43
37
-
-[ ] Create a forked copy of this project.
38
-
-[ ] Clone your OWN version of the repository in your terminal
39
-
-[ ] Create a new branch: git checkout -b `<firstName-lastName>`.
40
-
-[ ] Implement the project on your newly created `<firstName-lastName>` branch, committing changes regularly.
-[ ] Submit a Pull-Request to merge <firstName-lastName> Branch into main (student's Repository). **Please don't merge your own pull request**
46
-
-[ ] From the home page of your repo, make sure you have your branch selected
47
-
-[ ] Copy the URL and paste it into Canvas
48
-
49
-
### Task 2: MVP
50
-
44
+
### Task 2: Project Requirements
51
45
-**Don't focus on styling yet**. We want you to worry about function over form today.
46
+
-**Build all components as class components**
52
47
- Your todo list should display a list of todos, an input field, a submit button, and a clear all button.
53
48
- Be sure to use the given files for building out these components.
54
49
-`<App />` will hold all the data needed for this project. It will also be the container for your Todo Components.
@@ -59,24 +54,3 @@ Follow these steps for completing your project.
59
54
-`<TodoForm>` will hold your input field and your `Add Todo` and `Clear Completed` buttons.
60
55
- Your input field should take in user input, and allow a user to press `Enter` or click on the `Submit Button` to add a todo to your list.
61
56
- Once a todo is submitted, the Todo List should re-render and show the added todo.
62
-
63
-
---
64
-
65
-
- Add the functionality to toggle your todo's completed flag from `false` to `true`.
66
-
- Once a todo is completed, be sure to demonstrate to the user that the todo is completed by adding a line-through style property if the completed flag is true.
67
-
- Add the ability to remove any todos that you have completed. `.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`.
68
-
-**Now is the time to style** Take your time to make this an app that you can be proud of.
69
-
70
-
### Task 3: Stretch Problems
71
-
72
-
-**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.
73
-
74
-
-**Search Functionality** Add a input bar that allows you to search through your tasks and only show the ones that match the search input.
75
-
76
-
-**Hosting** Create a [Netlify Account](https://www.netlify.com/) and follow the tutorial on how to host your shiny new todo app on the world wide web.
77
-
78
-
## Submission Format
79
-
80
-
-[ ] Submit a Pull-Request to merge `<firstName-lastName>` Branch into `main` (student's Repo). **Please don't merge your own pull request**
81
-
-[ ] From the home page of your repo, make sure you have your branch selected
82
-
-[ ] Copy the URL and paste it into Canvas to submit your assignment
0 commit comments