Open hardikmodi1 opened 5 months ago
https://github.com/anjani-sprinklr/todoF/blob/main/src/App.js#L96 Since using everything from item, can pass entire item object to that component
https://github.com/anjani-sprinklr/todoF/blob/main/src/App.js#L96
key should be part of that item itself, while creating the item, create one more field in item with this id and that can be used as id
https://github.com/anjani-sprinklr/todoF/blob/main/src/item.js#L34
Things that can be derived should not be state, just update the state of parent component that will pass the updated status
https://github.com/anjani-sprinklr/todoF/blob/d852183cb227477fb93d5883fd08bd7bdd52866e/src/App.js#L35
!=
->!==
Read about difference between these two operators, and also on line after this where we are setting the state. We don't have to everytime pass a function to setState