MCPcopy Create free account
hub / github.com/codemistic/Web-Development / addNote

Function addNote

Google Keep Clone/src/components/App.jsx:10–14  ·  view source on GitHub ↗
(newNote)

Source from the content-addressed store, hash-verified

8 const [notes, setNotes] = useState([]);
9
10 function addNote(newNote) {
11 setNotes(prevNotes => {
12 return [...prevNotes, newNote];
13 });
14 }
15
16 function deleteNote(id) {
17 setNotes(prevNotes => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected