{"id":16985259,"url":"https://github.com/malcolmstill/astro-lit-hydration-issue","last_synced_at":"2026-03-06T04:30:17.205Z","repository":{"id":204886822,"uuid":"712890204","full_name":"malcolmstill/astro-lit-hydration-issue","owner":"malcolmstill","description":null,"archived":true,"fork":false,"pushed_at":"2023-11-01T12:29:30.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T06:14:39.910Z","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/malcolmstill.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}},"created_at":"2023-11-01T12:17:24.000Z","updated_at":"2023-11-08T02:22:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"12dd5a37-a5a1-493b-8046-a3c2ce1bff79","html_url":"https://github.com/malcolmstill/astro-lit-hydration-issue","commit_stats":null,"previous_names":["malcolmstill/astro-lit-hydration-issue"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcolmstill%2Fastro-lit-hydration-issue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcolmstill%2Fastro-lit-hydration-issue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcolmstill%2Fastro-lit-hydration-issue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcolmstill%2Fastro-lit-hydration-issue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malcolmstill","download_url":"https://codeload.github.com/malcolmstill/astro-lit-hydration-issue/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239892073,"owners_count":19714251,"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-14T02:43:04.278Z","updated_at":"2026-03-06T04:30:17.155Z","avatar_url":"https://github.com/malcolmstill.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Astro + Lit SSR hydration issue\n\n\u003cimg width=\"1172\" alt=\"Screenshot 2023-11-01 at 12 19 37\" src=\"https://github.com/malcolmstill/astro-lit-hydration-issue/assets/2567177/d3453980-6e1d-407b-a6f7-29fef716b643\"\u003e\n\nComponent `B` (child of component `A`) fails to hydrate when using SSR.\n\nIn component `C` and `D` I instead define constructors to set the properties hydration seems to work but then `items` in component `D` is at some point `undefined` and an error is thrown.\n\n- Is this a bug / issue?\n- Am I holding astro, lit or astro + lit wrong?\n\n## Details\n\nThis is a minimal reproduction built by:\n\n1. Create astro project\n```\nnpm create astro@latest\n```\n\n(empty project using typescript)\n\n2. Add lit\n\n```\nnpx astro add lit\n```\n\n3. Update tsconfig\n\nAdd options `experimentalDecorators` `true` and `useDefineForClassFields` `false`:\n\n```\n{\n  \"extends\": \"astro/tsconfigs/strict\",\n  \"compilerOptions\": {\n    \"experimentalDecorators\": true,\n    \"useDefineForClassFields\": false\n  }\n}\n\n```\n\n4. Add components (see `index.astro` + `src/components/`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalcolmstill%2Fastro-lit-hydration-issue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalcolmstill%2Fastro-lit-hydration-issue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalcolmstill%2Fastro-lit-hydration-issue/lists"}