
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-nested-form
Advanced tools
react-native-nested-form用常见的表单提交功能,支持表单嵌套,最后通过表单对象获取到整个表单值对象
npm install react-native-nested-form --save
import Form from './src/form';
import Input from './src/form/input';
export default class RCTNativeNestedForm extends Component {
constructor(props) {
super(props);
this.onPressed = this.onPressed.bind(this);
}
render() {
return (
<View style={{padding: 30}}>
<Form ref={(form) => this.form = form}>
<Input property="name" labelText="用户名" placeholder="请输入用户名"/>
<Input property="password" labelText="密码" placeholder="请输入密码"/>
<Form group={true} property="hobbies">
<Input property="name" labelText="爱好一" placeholder="请输入爱好一"/>
<Input property="name" labelText="爱好二" placeholder="请输入爱好二"/>
</Form>
</Form>
<TouchableOpacity style={{width: 250, height: 35, marginTop: 30, justifyContent: 'center', alignItems: 'center', backgroundColor: '#40b0ff'}} onPress={this.onPressed}>
<Text>提交</Text>
</TouchableOpacity>
</View>
);
}
onPressed() {
console.log('form data: \n' + JSON.stringify(this.form.data()));
}
}
{
"name":"chenyunjie",
"password":"123456",
"hobbies":[
{
"name":"足球"
},
{
"name":"篮球"
}
]
}
props
a. 每个表单项需要传递propery属性,表单的group=true时可以不传递
b. 非group类型的表单数据没有property参数,则不会将值记录到表单数据中去
方法:
取值:getValue
设值:setValue
属性:
表单标识:isFormCell=true
表单自身也可以存在setValue方法,该方法会根据表单结构和从给定的数据中按照props.property进行设置值
FAQs
The npm package react-native-nested-form receives a total of 0 weekly downloads. As such, react-native-nested-form popularity was classified as not popular.
We found that react-native-nested-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.