Edit It: Do states in React persist during re-rendering?
This code shows that a state's value persists during re-rendering. Modifying it also causes React to re-render the component.
See it on StackBlitzThis code shows that a state's value persists during re-rendering. Modifying it also causes React to re-render the component.
See it on StackBlitz