{"id":16256912,"url":"https://github.com/prazdevs/pinia-plugin-persistedstate-next","last_synced_at":"2025-04-08T13:34:26.505Z","repository":{"id":254905085,"uuid":"846972993","full_name":"prazdevs/pinia-plugin-persistedstate-next","owner":"prazdevs","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-28T13:05:42.000Z","size":611,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T06:37:31.887Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prazdevs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-24T13:38:49.000Z","updated_at":"2024-08-28T13:05:45.000Z","dependencies_parsed_at":"2024-08-26T23:09:14.796Z","dependency_job_id":null,"html_url":"https://github.com/prazdevs/pinia-plugin-persistedstate-next","commit_stats":null,"previous_names":["prazdevs/pinia-plugin-persistedstate-next"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prazdevs%2Fpinia-plugin-persistedstate-next","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prazdevs%2Fpinia-plugin-persistedstate-next/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prazdevs%2Fpinia-plugin-persistedstate-next/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prazdevs%2Fpinia-plugin-persistedstate-next/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prazdevs","download_url":"https://codeload.github.com/prazdevs/pinia-plugin-persistedstate-next/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247852317,"owners_count":21006925,"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":[],"created_at":"2024-10-10T15:46:42.062Z","updated_at":"2025-04-08T13:34:26.306Z","avatar_url":"https://github.com/prazdevs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/prazdevs/pinia-plugin-persistedstate-next/main/.github/assets/logo.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=352c34\u0026color=fd5e87\" 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=352c34\u0026color=fd5e87\" 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=352c34\u0026color=fd5e87\" 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\u003e [!IMPORTANT]\n\u003e We are actively looking for contributors to help us translate the documentation in various language (especially Chinese) to improve user experience. If you are interested, open an issue about it!\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`]().\n- Very smol (\u003c2kB minzipped).\n\n## Quickstart\n\n1. Install with your favorite package manager:\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```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```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-3).\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-next","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprazdevs%2Fpinia-plugin-persistedstate-next","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprazdevs%2Fpinia-plugin-persistedstate-next/lists"}