
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.
formik-persist-values
Advanced tools
Persist and rehydrate a Formik form values.
npm install formik-persist-values --save
yarn add formik-persist-values
Just import the <PersistFormikValues >
component and put it inside any Formik form. It renders null
!
import React from 'react';
import { Formik, Field, Form } from 'formik';
import { PersistFormikValues } from 'formik-persist-values';
export const Signup = () => (
<div>
<h1>My Cool Persisted Values</h1>
<Formik
onSubmit={values => console.log(values)}
initialValues={{ firstName: '', lastName: '', email: '' }}
>
{props => (
<Form className="whatever">
<Field name="firstName" placeholder="First Name" />
<Field name="lastName" placeholder="Last Name" />
<Field name="email" type="email" placeholder="Email Address" />
<button type="submit">Submit</button>
<PersistFormikValues name="signup-form" />
</Form>
)}
</Formik>
</div>
);
name: string
: LocalStorage key to save form state to.ignoreValues:? string[]
: Provide array of keys if you need to do not persist some values.debounce:? number
: Default is 300
. Number of ms to debounce the function that saves form state.storage:? 'localStorage' | 'sessionStorage' | Storage
: default is localStorage
. Send if you want Session storage or your own storage instead of Local storage.persistInvalid:? boolean
: default is false
. Persist if you want to save values while the form is invalid.hashInitials:? boolean
: default is false
. Hash initials values to prevent conflict between initialValues and persistedValues.hashSpecificity:? number
: default is 7
. Hash initials values specificity to prevent conflict between cache hashes.FAQs
Persist and rehydrate a Formik values
The npm package formik-persist-values receives a total of 850 weekly downloads. As such, formik-persist-values popularity was classified as not popular.
We found that formik-persist-values 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.