Updating React Nested State Properties
1 min readDec 11, 2019
Initial State
The initial state is nested, there is an address is another object which is inside of a state.
setState
setState using spread operator at each level, like:
We are using document.getElementById(“firstName”).value for fetch data from input field, we can also use event.target.name but it is too confusing.
Note:- For any query, you may comment in this section or message me on Facebook.