Actual Error:
Objects are not valid as a React child (found: object with keys {_id, title, description, date, price, creator}). If you meant to render a collection of children, use an array instead.
Following the instructions, I initialize the state of events to an empty array above the constructor within Events.js.
After the componentDidMount, fetchAllEvents is called and the events (all coming in as an array) apparently don't like to be replacing the initial empty array. Relevant code below
Actual Error:
Objects are not valid as a React child (found: object with keys {_id, title, description, date, price, creator}). If you meant to render a collection of children, use an array instead.
Following the instructions, I initialize the state of events to an empty array above the constructor within Events.js.
After the
componentDidMount
, fetchAllEvents is called and the events (all coming in as an array) apparently don't like to be replacing the initial empty array. Relevant code below