Project React ToDo app by EmmaE#440
Conversation
MalinSkill
left a comment
There was a problem hiding this comment.
Awesome work! The styling looks very promising, I look forward to see the finished version.
The checkboxes and count works fine, until you refresh the page. I added one suggestion to try for the checkboxes. Hope it works!
| import Header from 'components/Header'; | ||
| import TotalCompleteItems from 'components/TasksCompleted'; | ||
|
|
||
| export const App = () => { |
| </button> | ||
| <label htmlFor={`task_with_id${singleTask.id}`}> | ||
| Task completed | ||
| <input id={`task_with_id${singleTask.id}`} type="checkbox" value={singleTask.isDone} onChange={() => |
There was a problem hiding this comment.
I noticed that after refreshing the page. The completed count and checkboxes are not behaving correct. I think it can be a good idea to change value={singleTask.isDone} to checked={singleTask.isDone}
| }, | ||
| addTask: (store, action) => { | ||
| store.items = [action.payload, ...store.items]; | ||
| localStorage.setItem('taskList', JSON.stringify(store.items)); |
There was a problem hiding this comment.
Nice feature with the local storage!
| @@ -0,0 +1,45 @@ | |||
| /*eslint-disable*/ | |||
There was a problem hiding this comment.
Great structure of the code, easy to follow and understand
| /*tasks = useSelector(state => state.tasks) | ||
| const completedTasks = tasks.filter(singleTask => singleTask.isDone) | ||
| completedTasks.length*/ |
There was a problem hiding this comment.
Maybe clean up this now when you moved it into it's own component.
| @@ -0,0 +1,15 @@ | |||
| import React from 'react'; | |||
There was a problem hiding this comment.
Good idea to have also this as its own component. Makes it easy to find exactly what you are looking for quick if you need to do updates/changes.
| ## View it live | ||
|
|
||
| Every project should be deployed somewhere. Be sure to include the link to the deployed project so that the viewer can click around and see what it's all about. | ||
| Ehttps://todo-app-emmaeng.netlify.app/ |
No description provided.