Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
effector-final-form
Advanced tools
☄️ Effector bindings for Final Form 🏁
Forms values and validation rules are part of the business logic. This means that you need to be able to work with them without being bound to the UI-framework.
The goal of this project is to combine Final Form and Effector to achieve the above.
yarn add effector-final-form
# or
npm add effector-final-form
# or
pnpm add effector-final-form
Just import from the root module:
import { createForm } from 'effector-final-form';
import { createForm } from 'effector-final-form';
const form = createForm<{ login: string; password: string }>({
onSubmit: console.log,
subscribeOn: ['submitSucceeded', 'submitting'],
});
const loginField = form.api.registerField<string>({
name: 'login',
subscribeOn: ['value', 'error', 'validating'],
validate: (x) => (x?.length >= 3 ? undefined : 'Incorrect login'),
});
loginField.$state.watch(console.log);
// {value: undefined, error: undefined, validating: true}
// {name: "login", error: "Incorrect login", value: undefined, validating: false}
const passwordField = form.api.registerField<string>({
name: 'password',
subscribeOn: ['value', 'error', 'validating'],
validate: (x) => (x?.length >= 3 ? undefined : 'Incorrect password'),
});
passwordField.$state.watch(console.log);
// {value: undefined, error: undefined, validating: true}
// {name: "password", error: "Incorrect password", value: undefined, validating: false}
loginField.api.changeFx('John');
// {name: "login", error: undefined, value: "John", validating: true}
// {name: "login", error: undefined, value: "John", validating: false}
passwordField.api.changeFx('secret');
// {name: "password", error: undefined, value: "secret", validating: true}
// {name: "password", error: undefined, value: "secret", validating: false}
form.api.submitFx();
// {login: "John", password: "secret"}
0.7.0
FAQs
☄️ Effector bindings for Final Form
The npm package effector-final-form receives a total of 6 weekly downloads. As such, effector-final-form popularity was classified as not popular.
We found that effector-final-form demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.