Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Flux form is a helper for managing forms with flux
import fluxForm from 'flux-form'
import { Dispatcher } from 'flux'
const dispatcher = new Dispatcher()
const form = fluxForm('MyForm', dispatcher, {
fields: [
'name',
'email',
],
state: UserStore.getState(),
})
fluxForm
will return a form object which contains all the fields you defined,
a save action, a cancel action, and the current form's state.
class SampleFormComponent extends React.Component {
render() {
return (
<div>
<label>
Name
<input {...form.props.name} />
</label>
<label>
Email
<input {...form.props.email} />
</label>
<input type="button" onClick={form.save} />
</div>
)
}
}
...form.props.name
will add all of the props for the field name
onto the
input. The two important props are value
which contains the current value,
and onChange
which is a function handler that sets the value.
Flux Form is meant to be bare bones and generic in that you can build adapters on top of it so it works with your favorite flavor of flux.
For example, we can have an Alt specific form utility which creates a store that you can connect your React component to.
FAQs
Manage your forms with flux, any flux
We found that flux-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
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.