{"id":15646970,"url":"https://github.com/danielroe/nuxt-pre-hydrate","last_synced_at":"2025-04-15T11:52:46.392Z","repository":{"id":65849106,"uuid":"601252056","full_name":"danielroe/nuxt-pre-hydrate","owner":"danielroe","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-13T17:47:56.000Z","size":610,"stargazers_count":46,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-13T17:53:46.373Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielroe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-02-13T17:20:50.000Z","updated_at":"2024-04-15T20:30:31.536Z","dependencies_parsed_at":"2023-09-27T04:52:05.311Z","dependency_job_id":"2d54a008-9203-4f81-ab0b-c5a2440f280a","html_url":"https://github.com/danielroe/nuxt-pre-hydrate","commit_stats":{"total_commits":25,"total_committers":3,"mean_commits":8.333333333333334,"dds":"0.16000000000000003","last_synced_commit":"3090659caada7eed1450849903443af5826017dc"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielroe%2Fnuxt-pre-hydrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielroe%2Fnuxt-pre-hydrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielroe%2Fnuxt-pre-hydrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielroe%2Fnuxt-pre-hydrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielroe","download_url":"https://codeload.github.com/danielroe/nuxt-pre-hydrate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249067756,"owners_count":21207395,"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-03T12:16:02.404Z","updated_at":"2025-04-15T11:52:46.373Z","avatar_url":"https://github.com/danielroe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!IMPORTANT]  \n\u003e A new `onPrehydrate` hook was added to Nuxt core in v3.12.0 which replaces this module - see https://github.com/nuxt/nuxt/pull/27037.\n\n---\n\n# Nuxt Pre-Hydrate\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![Github Actions][github-actions-src]][github-actions-href]\n[![Codecov][codecov-src]][codecov-href]\n\n\u003e Safely run pre-hydration steps on the client with [Nuxt 3](https://nuxt.com)\n\n- [✨ \u0026nbsp;Changelog](https://github.com/danielroe/nuxt-pre-hydrate/blob/main/CHANGELOG.md)\n- [▶️ \u0026nbsp;Online playground](https://stackblitz.com/github/danielroe/nuxt-pre-hydrate/tree/main/playground)\n\n## Features\n\n- 💪 Prevents hydration mismatch on client\n- 🏁 Fully configurable\n- ⚠️ Experimental and under developemnt\n\n## Installation\n\nInstall and add `nuxt-pre-hydrate` to your `nuxt.config`.\n\n```bash\n# Whichever matches your package manager\npnpm add -D nuxt-pre-hydrate\nnpm install -D nuxt-pre-hydrate\nyarn add -D nuxt-pre-hydrate\n```\n\n```js\nexport default defineNuxtConfig({\n  modules: ['nuxt-pre-hydrate'],\n})\n```\n\n## Usage\n\nTo use, you can use the `\u003cPreHydrate\u003e` component anywhere in your app.\n\n```vue\n\u003cscript setup lang=\"ts\"\u003e\nconst contentRenderer = (renderProps) =\u003e /* return a string of the HTML meant to be rendered on the client */\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cPreHydrate tag=\"div\" :renderContent=\"contentRenderer\" strategy-name=\"test\" v-bind=\"renderProps\"\u003e\n    {{ contentRenderer() }}\n  \u003c/PreHydrate\u003e\n\u003c/template\u003e\n\n```\n\n## 💻 Development\n\n- Clone this repository\n- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`\n- Install dependencies using `pnpm install`\n- Stub module with `pnpm dev:prepare`\n- Run `pnpm dev` to start [playground](./playground) in development mode\n\n## License\n\nMade with ❤️\n\nPublished under the [MIT License](./LICENCE).\n\n\u003c!-- Badges --\u003e\n\n[npm-version-src]: https://img.shields.io/npm/v/nuxt-pre-hydrate?style=flat-square\n[npm-version-href]: https://npmjs.com/package/nuxt-pre-hydrate\n[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-pre-hydrate?style=flat-square\n[npm-downloads-href]: https://npm.chart.dev/nuxt-pre-hydrate\n[github-actions-src]: https://img.shields.io/github/actions/workflow/status/danielroe/nuxt-pre-hydrate/ci.yml?branch=main\n[github-actions-href]: https://github.com/danielroe/nuxt-pre-hydrate/actions?query=workflow%3Aci\n[codecov-src]: https://img.shields.io/codecov/c/gh/danielroe/nuxt-pre-hydrate/main?style=flat-square\n[codecov-href]: https://codecov.io/gh/danielroe/nuxt-pre-hydrate\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielroe%2Fnuxt-pre-hydrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielroe%2Fnuxt-pre-hydrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielroe%2Fnuxt-pre-hydrate/lists"}