{"id":15927800,"url":"https://github.com/thescientist13/hydrate-element","last_synced_at":"2026-01-31T02:31:43.639Z","repository":{"id":80192936,"uuid":"326287751","full_name":"thescientist13/hydrate-element","owner":"thescientist13","description":null,"archived":false,"fork":false,"pushed_at":"2021-01-02T23:07:33.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-13T12:50:20.894Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/thescientist13.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":"2021-01-02T23:05:52.000Z","updated_at":"2021-06-21T16:18:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"efa99631-1d38-42a9-84b3-7ca33ac93b1c","html_url":"https://github.com/thescientist13/hydrate-element","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thescientist13/hydrate-element","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thescientist13%2Fhydrate-element","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thescientist13%2Fhydrate-element/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thescientist13%2Fhydrate-element/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thescientist13%2Fhydrate-element/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thescientist13","download_url":"https://codeload.github.com/thescientist13/hydrate-element/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thescientist13%2Fhydrate-element/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28927159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T22:32:35.345Z","status":"online","status_checked_at":"2026-01-31T02:00:09.179Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-06T23:20:24.830Z","updated_at":"2026-01-31T02:31:43.624Z","avatar_url":"https://github.com/thescientist13.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\nUse case is to see if that given the pre-rendered markup of a component, is there a graceful way for a Web Component (`customElement`) to restore its state in away that can avoid repeated renders on first load.\n\n## Use Cases\n\n### Counter\nGiven a counter component\n```html\n\u003cmy-counter\u003e\u003c/my-counter\u003e\n```\n\nIf the count state is present, hydrate the count to the initial value of `33`\n```html\n\u003cmy-counter\u003e\n  \u003cspan id=\"count\"\u003e33\u003c/span\u003e\n\u003c/my-counter\u003e\n```\n\n### Dyanamic List\nIn particular, say a list of users is generated on the server\n```json\n[{\n  \"id\": 1,\n  \"name\": \"User 1\",\n}, {\n  \"id\": 2,\n  \"name\": \"User 2\"\n}]\n```\n\n```html\n\u003cul\u003e\n  \u003cli\u003e\u003ca href=\"/user/1\"\u003eUser 1\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"/user/2\"\u003eUser 2\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n```\n\nIf that user list is present, we want to avoid a call to `fetch` that would return and render the same list.  However, when say you are paginating to a next list, you would need to make sure your offest starts on page 2.\n\n## Goals\n1. Detect of existing output\n1. Hydrate state\n1. Hydrate markup?\n1. Sync state (e.g. avoid being one tick behind)\n\n\n## Notes\n1. Rehydrating would still need to attach event handlers","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthescientist13%2Fhydrate-element","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthescientist13%2Fhydrate-element","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthescientist13%2Fhydrate-element/lists"}