Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
simple-forms-react
Advanced tools
yet another Form component
npm i -S simple-forms-react
Form
propsname | type | default | description |
---|---|---|---|
initialValues | Object | {} | you should pass all the fields as keys and their default/initial values |
children | function | ({values, touched, errors, valid, isSubmitting, fieldProps, handleSubmit, setValues, setSubmitting}) => {} | this function should return the JSX which contains the form and all inputs |
validators | Object | {} | this contains validators for each input, please see Validator section to see the contract of a validator function |
children
function argumentsname | type | description |
---|---|---|
values | Object | contains values of all the inputs |
touched | Object | key-value of inputs and whether they've been touched or not |
errors | Object | errors object contains error message for inputs if there's an error |
valid | boolean | tells if the entire form is valid or not |
isSubmitting | boolean | tells if the form is submitting, useful to make your submit button disabled or hide altogether |
fieldProps | function | this returns the props that need to be applied on the input, you should pass all the props in as an object, it chains onChange and other things which Form uses internally |
handleSubmit | function | use this as onSubmit prop of <form> |
setValues | function | accepts an object and updates the values of the inputs as per the passed argument |
setSubmitting | function | a helper utility to change the isSubmitting flag. |
FAQs
An awesome Form for React!
The npm package simple-forms-react receives a total of 1 weekly downloads. As such, simple-forms-react popularity was classified as not popular.
We found that simple-forms-react 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.