Will setState({..}) clear the old state or will it conditionally update it?
Will setState({..}) clear the old state or will it conditionally update it?
Let’s say my current state is {‘a’:1, ‘b’:2}. I’m wondering if I call setState({‘c’:3}), will the state ‘a’ = 1 and ‘b’ = 2 be erased? Or will I have something equivalent to {‘a’:1, ‘b’:2, ‘c’:3}?