use-set-state
useState wrapper to work with state like in class components
Import
Source
Docs
Package
Usage
use-set-state hook works similar to how this.setState
works in class components – it shallow merges state partial
into current state.
Note that hook can work only with objects: primitive values and arrays are not supported: