how do you set a react hook that is an object code example
Example: prevstate in usestate
const [prevState, setState] = React.useState([]);
setState(prevState => [...prevState, 'somedata'] );
const [prevState, setState] = React.useState([]);
setState(prevState => [...prevState, 'somedata'] );