Creates a state object, which includes the provided values,
as well as helper methods for updating those values and automatically
rerendering your component's UI to reflect said updates.
Uses React.useState under the hood, with a separate call
to useState for each top-level key in the provided object.
Creates a state object, which includes the provided values, as well as helper methods for updating those values and automatically rerendering your component's UI to reflect said updates.
Uses React.useState under the hood, with a separate call to
useState
for each top-level key in the provided object.Discussion: When to use
cleanState
.