MCPcopy Index your code
hub / github.com/CodeWithHarry/Sigma-Web-Dev-Course / handleCheckbox

Function handleCheckbox

Video 114/src/App.jsx:61–70  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

59 }
60
61 const handleCheckbox = (e) => {
62 let id = e.target.name;
63 let index = todos.findIndex(item=>{
64 return item.id === id;
65 })
66 let newTodos = [...todos];
67 newTodos[index].isCompleted = !newTodos[index].isCompleted;
68 setTodos(newTodos)
69 saveToLS()
70 }
71
72
73 return (

Callers

nothing calls this directly

Calls 1

saveToLSFunction · 0.85

Tested by

no test coverage detected