-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Going through the code i saw you use states in almost all the components. There should be a difference and you should be able to use functional components when needed. there need to be some sort of communication between parent and child components.
Also using bind in the render method can lead to untimely performance issues as I've dropped in some of the comments.
Avoid forEach when you can and use map instead. where you used state.list could have been distrcuted to
(({list}) => {
const newList = list.map((todo) => ({...todo, isCompleted: showCompleted})
return {list: newList}
} )
I tell beginners to stay away from using create-react app. as
- it hides the complexity which isn't a good enough thing for beginners
- When it comes to auditing. using npm run eject gives about 500 lines of config files which is going to be a lot of hell trying to audit each lines of code
- you leave the maintain of your app to it's creators. which could turn to a huge technical debt.
The to-do app seem to be less challenging. why don't you try a game of tic-tac-toe instead?
iykazrji
Metadata
Metadata
Assignees
Labels
No labels