
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
react-native-form
Advanced tools
A simple react-native component to wrap your form fields and get their values without attaching listeners everywhere.
npm install --save react-native-form
Just put your fields inside the form, with 2 props:
name
=> Your key to retrieve the value (required)
type
=> The field type (required)
key
=> Required for fields with the same name
import Form from 'react-native-form'
<Form ref="form">
<View>
<View>
<TextInput type="TextInput" name="myTextInput" /> // Yes, it doesn't matter how deep they are :)
</View>
</View>
<Switch type="Switch" name="mySwitch" />
<Slider type="Slider" name="mySlider" />
<DatePickerIOS type="DatePickerIOS" name="myBirthday" />
<Picker type="Picker" name="myPicker" />
<PickerIOS type="PickerIOS" name="pickers[ios]" /> // Yes, we support form serialization, like the web
</Form>
And then you can call this.refs.form.getValues()
.
You will get an object with all the values serialized. Simple as that.
Just pass the prop customFields
to the form. Check out the example below using the react-native-radio-buttons field:
var customFields = {
'RadioButtons': {
controlled: true,
valueProp: 'selectedOption',
callbackProp: 'onSelection',
}
}
<Form ref="form" customFields={customFields}>
<RadioButtons type="RadioButtons" name="radioButtons" />
</Form>
If you have form fields under an Accordion component, add:
type="Accordion"
to the Accordion component to have Form include the Accordion children.
react-native-form is licensed under the MIT license.
FAQs
A simple react-native component to wrap your form fields!
The npm package react-native-form receives a total of 214 weekly downloads. As such, react-native-form popularity was classified as not popular.
We found that react-native-form demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.