Skip to content

Tag: state

How to update nested array in React state?

I am trying to update my state so that a nested array gets emptied but the rest of the state stays the same. My state object looks like: And I the closest I get to working is: The console warning I get with this approach is: But how else is this possible? Many thanks 🙂 Answer The first problem I