use-validated-state
Manages state with validation
Import
Source
Docs
Package
Usage
use-validated-state
validates state with a given rule each time state is set.
It returns an object with current validation state, last valid value and current value:
Example
Current value: [empty string]
Last valid value: [empty string]