millerm30 / chore-bucks

Chore Bucks. Kids complete chores for points.
4 stars 0 forks source link

Unique ID #4

Closed millerm30 closed 2 years ago

millerm30 commented 2 years ago

Unique Id / Key required for chores list to be added.

jackharrhy commented 2 years ago
  const addChore = (chore) => {
    toast.success(`${chore} added to chores list!`);
    setChores([...chores, { id: uuid(), chore }]);
  };

example add chore

millerm30 commented 2 years ago

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."

millerm30 commented 2 years ago

Fix for unique id objects error. Task completed.