{"id":13457613,"url":"https://github.com/prazdevs/pinia-plugin-persistedstate","last_synced_at":"2025-05-12T07:50:02.756Z","repository":{"id":37652857,"uuid":"421036922","full_name":"prazdevs/pinia-plugin-persistedstate","owner":"prazdevs","description":"💾 Configurable persistence and rehydration of Pinia stores.","archived":false,"fork":false,"pushed_at":"2025-05-10T20:04:55.000Z","size":6332,"stargazers_count":2350,"open_issues_count":17,"forks_count":134,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-05-11T20:16:16.966Z","etag":null,"topics":["nuxt","nuxt-module","pinia","pinia-plugin"],"latest_commit_sha":null,"homepage":"https://prazdevs.github.io/pinia-plugin-persistedstate/","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/prazdevs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"ko_fi":"prazdevs","github":"prazdevs"}},"created_at":"2021-10-25T13:32:18.000Z","updated_at":"2025-05-11T08:24:31.000Z","dependencies_parsed_at":"2024-04-12T22:36:52.542Z","dependency_job_id":"26663004-c168-4825-bf4e-3f1bfc28f082","html_url":"https://github.com/prazdevs/pinia-plugin-persistedstate","commit_stats":{"total_commits":528,"total_committers":33,"mean_commits":16.0,"dds":0.4696969696969697,"last_synced_commit":"9cde18e16700387efe6a3cba5b53b214d49aeb85"},"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prazdevs%2Fpinia-plugin-persistedstate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prazdevs%2Fpinia-plugin-persistedstate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prazdevs%2Fpinia-plugin-persistedstate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prazdevs%2Fpinia-plugin-persistedstate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prazdevs","download_url":"https://codeload.github.com/prazdevs/pinia-plugin-persistedstate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253635426,"owners_count":21939813,"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":["nuxt","nuxt-module","pinia","pinia-plugin"],"created_at":"2024-07-31T09:00:31.557Z","updated_at":"2025-05-12T07:50:02.719Z","avatar_url":"https://github.com/prazdevs.png","language":"TypeScript","funding_links":["https://ko-fi.com/prazdevs","https://github.com/sponsors/prazdevs"],"categories":["TypeScript","nuxt"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/prazdevs/pinia-plugin-persistedstate/main/docs/public/logo-dark.svg\" style=\"width: 100px\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003e\n  Pinia Plugin Persistedstate\n\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  Configurable persistence and rehydration of Pinia stores.\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://npmjs.com/package/pinia-plugin-persistedstate\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/pinia-plugin-persistedstate?style=flat-square\u0026labelColor=313244\u0026color=cba6f7\" alt=\"npm\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://bundlephobia.com/result?p=pinia-plugin-persistedstate\"\u003e\u003cimg src=\"https://img.shields.io/bundlephobia/minzip/pinia-plugin-persistedstate?style=flat-square\u0026labelColor=313244\u0026color=cba6f7\" alt=\"minizipped size\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/prazdevs/pinia-plugin-persistedstate/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/prazdevs/pinia-plugin-persistedstate?style=flat-square\u0026labelColor=313244\u0026color=cba6f7\" alt=\"license\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://prazdevs.github.io/pinia-plugin-persistedstate\"\u003e\u003cb\u003eDocumentation\u003c/b\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Features\n\n- Persist Pinia stores with a friendly API inspired by [`vuex-persistedstate`](https://github.com/robinvdvleuten/vuex-persistedstate).\n- Highly customizable (storage, serializer, paths picking/omitting).\n- Out of the box SSR-friendly support for [`Nuxt`](#usage-with-nuxt).\n- Very smol (\u003c2kB minzipped).\n\n## Quickstart\n\n1. Install with your favorite package manager:\n\n   - **pnpm** : `pnpm add pinia-plugin-persistedstate`\n   - npm : `npm i pinia-plugin-persistedstate`\n   - yarn : `yarn add pinia-plugin-persistedstate`\n\n2. Add the plugin to pinia:\n\n```ts\nimport { createPinia } from 'pinia'\nimport piniaPluginPersistedstate from 'pinia-plugin-persistedstate'\n\nconst pinia = createPinia()\npinia.use(piniaPluginPersistedstate)\n```\n\n3. Add the `persist` option to the store you want to be persisted:\n\n```ts\nimport { defineStore } from 'pinia'\n\nexport const useStore = defineStore('store', {\n  state: () =\u003e ({\n    someState: 'hello pinia',\n  }),\n  persist: true,\n})\n```\n\n## Configuration\n\nYou can configure how a store is persisted by specifying options to the `persist` property:\n\n```ts\nexport const useStore = defineStore('store', () =\u003e {\n  const someState = ref('hello pinia')\n  return { someState }\n}, {\n  persist: {\n    storage: sessionStorage,\n    pick: ['someState'],\n  },\n})\n```\n\nAll the available configuration options are explained [here](https://prazdevs.github.io/pinia-plugin-persistedstate/guide/config).\n\n## Usage with Nuxt\n\nNuxt support comes out of the box thanks to the included module. You just need to install the package and add the module to your `nuxt.config.ts` as follows:\n\n```ts\nexport default defineNuxtConfig({\n  modules: [\n    '@pinia/nuxt', // required\n    'pinia-plugin-persistedstate/nuxt',\n  ],\n})\n```\n\nMore information on storages and configuration in Nuxt [here](https://prazdevs.github.io/pinia-plugin-persistedstate/frameworks/nuxt).\n\n## Limitations\n\nThere are several limitations that should be considered, more on those [here](https://prazdevs.github.io/pinia-plugin-persistedstate/guide/limitations).\n\n## Contributing\n\nSee the [contribution guide](https://github.com/prazdevs/pinia-plugin-persistedstate/blob/main/CONTRIBUTING.md).\n\n## License\n\n[MIT](https://github.com/prazdevs/pinia-plugin-persistedstate/blob/main/LICENSE) © 2021-present [Sacha Bouillez](https://github.com/prazdevs)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprazdevs%2Fpinia-plugin-persistedstate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprazdevs%2Fpinia-plugin-persistedstate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprazdevs%2Fpinia-plugin-persistedstate/lists"}