Version: v4.10.1
use-input
#
AboutInput hook for React.
#
Installation#
Importing the hook#
UsageBase
With optional validator
#
ArgumentsArgument | Type | Description | Default value |
---|---|---|---|
initialValue | string | Initial value of the string | "" |
opts | object | Options | {} |
#
OptionsOption key | Type | Description | Default value |
---|---|---|---|
validate | function | Validator function which receives changed valued before update as well as current value and should return true or false | undefined |
#
Return valueReturn value | Type | Description |
---|---|---|
{value, onChange} | Object | Object containing {value : "String", onChange: "function that accepts an event and updates the value of the string"} |
#
Join Bhargav's discord serverYou can click on the floating discord icon at the bottom right of the screen and talk to us in our server.