react-native-chainable
Chain through your React Native forms with ease
Installation
npm i react-native-chainable
Usage
// ... { return <Chainable> chain <> <Chainable.Input = = = /> <Chainable.Input = = = ="password" /> <Chainable.Input = = ="confirm" /> </> </Chainable> ; }
API
Chainable
Render prop (function as children)
The function you pass as a child will be called with a function that allows you to chain to (i.e. set focus on) the next input by name
Type | Description |
---|---|
(name: string) => void | Function to chain to the next input by name |
Chainable.Input
Props
Name | Type | Description |
---|---|---|
name | string (optional) | A name for the input |
isLast | boolean (optional, defaults to false ) |
When true , the input should be considered as the last one |