use-validated-state
Validate state and get last valid value
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]