{"id":13469624,"url":"https://github.com/hadeeb/react-lazy-hydration","last_synced_at":"2025-03-26T07:30:55.807Z","repository":{"id":40591450,"uuid":"166546115","full_name":"hadeeb/react-lazy-hydration","owner":"hadeeb","description":"Lazy Hydration for Server Rendered React Components","archived":false,"fork":false,"pushed_at":"2024-02-20T17:43:38.000Z","size":350,"stargazers_count":372,"open_issues_count":22,"forks_count":22,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-09-22T09:38:35.873Z","etag":null,"topics":["hydration","lazy-loading","react","ssr"],"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/hadeeb.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-19T12:48:49.000Z","updated_at":"2024-09-18T07:33:04.000Z","dependencies_parsed_at":"2024-06-18T18:19:22.068Z","dependency_job_id":"baef9783-8599-48fe-bf4b-25b6fe3bb8ca","html_url":"https://github.com/hadeeb/react-lazy-hydration","commit_stats":{"total_commits":56,"total_committers":9,"mean_commits":6.222222222222222,"dds":0.2321428571428571,"last_synced_commit":"8faafaa86ecb0f97ac0296882b438eabe158de5e"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadeeb%2Freact-lazy-hydration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadeeb%2Freact-lazy-hydration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadeeb%2Freact-lazy-hydration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadeeb%2Freact-lazy-hydration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hadeeb","download_url":"https://codeload.github.com/hadeeb/react-lazy-hydration/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221997291,"owners_count":16913723,"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":["hydration","lazy-loading","react","ssr"],"created_at":"2024-07-31T15:01:47.294Z","updated_at":"2024-10-29T22:31:21.605Z","avatar_url":"https://github.com/hadeeb.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# React Lazy Hydration\n\nLazy Hydration for Server Rendered React Components\n\n## Installation\n\n```bash\nnpm i react-lazy-hydration\n```\n\nOR\n\n```bash\nyarn add react-lazy-hydration\n```\n\n## Usage\n\n```jsx\nimport React from \"react\";\nimport LazyHydrate from \"react-lazy-hydration\";\n\nfunction App() {\n  return (\n    \u003cdiv\u003e\n      {/* Skip Hydrating  */}\n      \u003cLazyHydrate ssrOnly\u003e\n        {...}\n      \u003c/LazyHydrate\u003e\n      {/* Requires IntersectionObserver. Polyfill not included. */}\n      \u003cLazyHydrate whenVisible\u003e\n        {...}\n      \u003c/LazyHydrate\u003e\n      {/* Requires requestIdleCallback. Polyfill not included. */}\n      \u003cLazyHydrate whenIdle\u003e\n        {...}\n      \u003c/LazyHydrate\u003e\n      {/* Hydrate on any of the following events */}\n      \u003cLazyHydrate on=\"click\" /*OR on={[\"click\",\"mouseenter\",...]} */\u003e\n        {...}\n      \u003c/LazyHydrate\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\n## Notes\n\nBased on this [comment](https://github.com/facebook/react/issues/10923#issuecomment-338715787)\n\nand heavily adapted from [Lazy hydration for Vue SSR](https://github.com/znck/lazy-hydration)\n\n## Contribute\n\nFirst off, thanks for taking the time to contribute!\nNow, take a moment to be sure your contributions make sense to everyone else.\n\n### Reporting Issues\n\nFound a problem? Want a new feature? First of all see if your issue or idea has [already been reported](https://github.com/hadeeb/react-lazy-hydrate/issues).\nIf not, just open a [new clear and descriptive issue](https://github.com/hadeeb/react-lazy-hydrate/issues/new).\n\n### Submitting pull requests\n\nPull requests are the greatest contributions, so be sure they are focused in scope, and do avoid unrelated commits.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhadeeb%2Freact-lazy-hydration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhadeeb%2Freact-lazy-hydration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhadeeb%2Freact-lazy-hydration/lists"}