Gathering detailed insights and metrics for formik-persist-values
Gathering detailed insights and metrics for formik-persist-values
Gathering detailed insights and metrics for formik-persist-values
Gathering detailed insights and metrics for formik-persist-values
npm install formik-persist-values
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
21 Stars
51 Commits
11 Forks
1 Watching
1 Branches
1 Contributors
Updated on 28 Dec 2023
Minified
Minified + Gzipped
TypeScript (77.53%)
JavaScript (22.47%)
Cumulative downloads
Total Downloads
Last day
23.7%
266
Compared to previous day
Last week
12.7%
1,259
Compared to previous week
Last month
33.4%
5,311
Compared to previous month
Last year
-25.3%
65,881
Compared to previous year
2
30
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
!
1import React from 'react'; 2import { Formik, Field, Form } from 'formik'; 3import { PersistFormikValues } from 'formik-persist-values'; 4 5export const Signup = () => ( 6 <div> 7 <h1>My Cool Persisted Values</h1> 8 <Formik 9 onSubmit={values => console.log(values)} 10 initialValues={{ firstName: '', lastName: '', email: '' }} 11 > 12 {props => ( 13 <Form className="whatever"> 14 <Field name="firstName" placeholder="First Name" /> 15 <Field name="lastName" placeholder="Last Name" /> 16 <Field name="email" type="email" placeholder="Email Address" /> 17 <button type="submit">Submit</button> 18 <PersistFormikValues name="signup-form" /> 19 </Form> 20 )} 21 </Formik> 22 </div> 23);
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.No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 3/30 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
39 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More