const handleOnSubmit = (e) => { e.preventDefault(); setList( produce((draft) => { draft.push({ id: Math.floor(Math.random() * 100), title: name, }); }) ); };
const handleOnSubmit = (e) => { e.preventDefault(); setList( produce((draft) => { draft.push({ id: Math.floor(Math.random() * 100), title: name, }); }) ); };