Config
This an optional configuration file to change the behaviour of aio-inputs. You can config these properties:
- asyncDelay asynchronous validation waiting time when user stops typing.
- pid persist data on component unmount with this ID.
Async delay
Use asyncDelay to set the time to wait before calling your asynchronous validation function when user stops typing.
The default value on inputs creation is 800ms. You can change asyncDelay by passing its value in a config file as second argument of useInputs().
const[myInputs, form]=useInputs(yourInputs ,{
asyncDelay:800 // The type is number
})Copied
Persist ID
You can persist data on component unmount with a pid.pid must be a unique ID throughout your application, and must not change during the component's lifetime.
const[myInputs, form]=useInputs(yourInputs ,{
pid:"myUniqueId"
})Copied
Hit next to find out how to TRACK YOUR INPUTS outside a component.