Closed millerm30 closed 2 years ago
const addChore = (chore) => {
toast.success(`${chore} added to chores list!`);
setChores([...chores, { id: uuid(), chore }]);
};
example add chore
Start of unique key add for chores. error code "Objects are not valid as a React child (found: object with keys {id, chore}). If you meant to render a collection of children, use an array instead."
Fix for unique id objects error. Task completed.
Unique Id / Key required for chores list to be added.