setState only manages the state in the widget in which it was declared — just like in React, wherein the useState hook manages local state only in the component in which it was created. This type of state management is called ephemeral state.
setState only manages the state in the widget in which it was declared — just like in React, wherein the useState hook manages local state only in the component in which it was created. This type of state management is called ephemeral state.