Supports both controlled and uncontrolled usage. When controlledValue is defined the hook is controlled (internal state is ignored); otherwise it manages its own state seeded from defaultValue. onChange always fires.
controlledValue
defaultValue
onChange
Optional
Supports both controlled and uncontrolled usage. When
controlledValueis defined the hook is controlled (internal state is ignored); otherwise it manages its own state seeded fromdefaultValue.onChangealways fires.