{"id":13787288,"url":"https://github.com/jaredpalmer/formik-persist","last_synced_at":"2025-04-12T18:41:59.538Z","repository":{"id":25699460,"uuid":"105580137","full_name":"jaredpalmer/formik-persist","owner":"jaredpalmer","description":"💾   Persist and rehydrate a Formik form to localStorage","archived":false,"fork":false,"pushed_at":"2022-04-08T08:04:14.000Z","size":101,"stargazers_count":377,"open_issues_count":28,"forks_count":56,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-10T02:44:22.108Z","etag":null,"topics":["form","formik","forms","react"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaredpalmer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-02T20:13:11.000Z","updated_at":"2024-11-21T18:10:20.000Z","dependencies_parsed_at":"2022-07-27T05:16:30.257Z","dependency_job_id":null,"html_url":"https://github.com/jaredpalmer/formik-persist","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredpalmer%2Fformik-persist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredpalmer%2Fformik-persist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredpalmer%2Fformik-persist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredpalmer%2Fformik-persist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredpalmer","download_url":"https://codeload.github.com/jaredpalmer/formik-persist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248617056,"owners_count":21134182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["form","formik","forms","react"],"created_at":"2024-08-03T20:00:32.467Z","updated_at":"2025-04-12T18:41:59.514Z","avatar_url":"https://github.com/jaredpalmer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Formik Persist\n\nPersist and rehydrate a [Formik](https://github.com/jaredpalmer/formik) form.\n\n```\nnpm install formik-persist --save\n```\n\n# Basic Usage\n\nJust import the `\u003cPersist \u003e` component and put it inside any Formik form. It renders `null`!\n\n```js\nimport React from 'react'\nimport { Formik, Field, Form } from 'formik'\nimport { Persist } from 'formik-persist'\n\nexport const Signup = () =\u003e\n  \u003cdiv\u003e\n    \u003ch1\u003eMy Cool Persisted Form\u003c/h1\u003e\n    \u003cFormik\n      onSubmit={values =\u003e console.log(values)}\n      initialValues={{ firstName: '', lastName: '', email: '' }}\n      render={props =\u003e\n        \u003cForm className=\"whatever\"\u003e\n          \u003cField name=\"firstName\" placeholder=\"First Name\" /\u003e\n          \u003cField name=\"lastName\" placeholder=\"Last Name\" /\u003e\n          \u003cField name=\"email\" type=\"email\" placeholder=\"Email Address\" /\u003e\n          \u003cbutton type=\"submit\"\u003eSubmit\u003c/button\u003e\n          \u003cPersist name=\"signup-form\" /\u003e\n        \u003c/Form\u003e}\n    /\u003e\n  \u003c/div\u003e;\n```\n\n### Props\n\nOnly three props! \n\n- `name: string`: LocalStorage key to save form state to\n- `debounce:? number`: Default is `300`. Number of ms to debounce the function that saves form state.\n- `isSessionStorage:? boolean`: default is `false` . Send if you want Session storage inplace of Local storage\n\n\n## Author\n\n- Jared Palmer [@jaredpalmer](https://twitter.com/jaredpalmer)\n\n\n## Todo\n\n- Alternative storages (localForage)\n- Support AsyncStorage for React Native\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredpalmer%2Fformik-persist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredpalmer%2Fformik-persist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredpalmer%2Fformik-persist/lists"}