Persist and rehydrate a Formik form to localStorage
Persist and rehydrate a Formik form to localStorage
Persist and rehydrate a Formik form.
npm install formik-persist --saveJust import the `` 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 = () =>
;Only three props!
name: string: LocalStorage key to save form state todebounce:? 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 storageNo open issues yet, or sync has not completed.