The answer is Don't use Nested State in React. Read this excellent answer. What should be used instead? Simply not using nested state is an unacceptable answer for how widely used React is today.
How do I change my nested state in React?
Approach 1: We can create a dummy object to perform operations on it (update properties that we want) then replace the component's state with the updated object. Approach 2: We can pass the old nested object using the spread operator and then override the particular properties of the nested object.
Is state management necessary in React?
Why do you need React state management? React applications are built using components and they manage their state internally and it works well for applications with few components, but when the application grows bigger, the complexity of managing states shared across components becomes difficult.