-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project React ToDo app by EmmaE #440
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 TaskList from 'components/TaskList'; | ||
import tasks from 'reducers/task'; | ||
import Header from 'components/Header'; | ||
import TotalCompleteItems from 'components/TasksCompleted'; | ||
|
||
export const App = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and clean 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice feature with the local storage!
@@ -0,0 +1,45 @@ | |||
/*eslint-disable*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a little typo sneaked in here
No description provided.