DEV Community

ScorbicLife
ScorbicLife

Posted on • Updated on

Managing State

https://react.dev/learn/managing-state

Preserving and Resetting State

  • React resets the component's state if and only if the component in the same position in the UI tree is removed or has changed to a different component.
    • Note: You can override the position inside the UI tree by providing a key prop.

Top comments (0)