const [prevState, setState] = React.useState([]); setState(prevState => [...prevState, 'somedata'] );