score:1

Accepted answer
 setOptions(updatedOptions)

score:0

const [state, setState] = useState({})
setState((prev) => {
    // do whatever you want to do with the previous state
})

Related Query

More Query from same tag