All Projects → jaredpalmer → Formik Persist

jaredpalmer / Formik Persist

Licence: mit
💾 Persist and rehydrate a Formik form to localStorage

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Formik Persist

react-search
This package will help you create a pretty good and beautiful search. And other related features
Stars: ✭ 17 (-95.07%)
Mutual labels:  forms, form
form-data-json
A zero dependency, cross browser library to easily get or set/manipulate form input values as/from a json object.
Stars: ✭ 37 (-89.28%)
Mutual labels:  forms, form
SuluFormBundle
Form Bundle for handling Dynamic and Symfony Forms in https://sulu.io
Stars: ✭ 51 (-85.22%)
Mutual labels:  forms, form
react-formulation
Simple React form validation
Stars: ✭ 14 (-95.94%)
Mutual labels:  forms, form
react-hubspot
A collection of React hooks for interacting with Hubspot APIs
Stars: ✭ 20 (-94.2%)
Mutual labels:  forms, form
p01contact
Create contact forms by writing simple tags. Also a plugin for GetSimple and Pico CMS.
Stars: ✭ 15 (-95.65%)
Mutual labels:  forms, form
Forms
Tracking our progress moving all city paper and pdf forms online.
Stars: ✭ 14 (-95.94%)
Mutual labels:  forms, form
ember-validity-modifier
Ember Octane addon to add custom validity (form validation) to form fields
Stars: ✭ 28 (-91.88%)
Mutual labels:  forms, form
react-final-form-listeners
A collection of components to listen to 🏁 React Final Form fields
Stars: ✭ 91 (-73.62%)
Mutual labels:  forms, form
vue-use-form
✅ A Vue.js composition API function to validate forms
Stars: ✭ 97 (-71.88%)
Mutual labels:  forms, form
aurelia-form
Fun with forms! Form utilities to make stuff just a bit (a lot) easier.
Stars: ✭ 34 (-90.14%)
Mutual labels:  forms, form
ContactEtc
Laraval package to instantly add a customisable contact form to your site.
Stars: ✭ 21 (-93.91%)
Mutual labels:  forms, form
svelte-multistep-form
Svelte MultiStep Form like, this component is still in beta stage
Stars: ✭ 29 (-91.59%)
Mutual labels:  forms, form
formurai
Lightweight and powerfull library for declarative form validation
Stars: ✭ 49 (-85.8%)
Mutual labels:  forms, form
final-form-arrays
Array Mutators for 🏁 Final Form
Stars: ✭ 64 (-81.45%)
Mutual labels:  forms, form
contact-officials
Form definitions powering Resistbot's electronic deliveries to elected officials in the United States.
Stars: ✭ 29 (-91.59%)
Mutual labels:  forms, form
react-apollo-form
Build React forms based on GraphQL APIs.
Stars: ✭ 195 (-43.48%)
Mutual labels:  forms, form
FrontendForms
A module for ProcessWire CMS to create and validate forms on the frontend easily using the Valitron library.
Stars: ✭ 0 (-100%)
Mutual labels:  forms, form
react-cool-form
😎 📋 React hooks for forms state and validation, less code more performant.
Stars: ✭ 246 (-28.7%)
Mutual labels:  forms, form
form-js
View and visually edit JSON-based forms.
Stars: ✭ 125 (-63.77%)
Mutual labels:  forms, form

Formik Persist

Persist and rehydrate a Formik form.

npm install formik-persist --save

Basic Usage

Just import the <Persist > component and put it inside any Formik form. It renders null!

import React from 'react'
import { Formik, Field, Form } from 'formik'
import { Persist } from 'formik-persist'

export const Signup = () =>
  <div>
    <h1>My Cool Persisted Form</h1>
    <Formik
      onSubmit={values => console.log(values)}
      initialValues={{ firstName: '', lastName: '', email: '' }}
      render={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>
          <Persist name="signup-form" />
        </Form>}
    />
  </div>;

Props

Only three props!

  • name: string: LocalStorage key to save form state to
  • debounce:? number: Default is 300. Number of ms to debounce the function that saves form state.
  • isSessionStorage:? boolean: default is false . Send if you want Session storage inplace of Local storage

Author

Todo

  • Alternative storages (localForage)
  • Support AsyncStorage for React Native
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].