{"id":50976108,"url":"https://github.com/xpl/react-leak","last_synced_at":"2026-06-19T08:03:56.679Z","repository":{"id":354889019,"uuid":"1225837196","full_name":"xpl/react-leak","owner":"xpl","description":"A repro of react-refresh leaking FiberRootNodes from secondary renderers","archived":false,"fork":false,"pushed_at":"2026-04-30T17:42:57.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-30T19:17:27.737Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/xpl.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-30T17:36:34.000Z","updated_at":"2026-04-30T17:43:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/xpl/react-leak","commit_stats":null,"previous_names":["xpl/react-leak"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/xpl/react-leak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xpl%2Freact-leak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xpl%2Freact-leak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xpl%2Freact-leak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xpl%2Freact-leak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xpl","download_url":"https://codeload.github.com/xpl/react-leak/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xpl%2Freact-leak/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34522042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"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":"2026-06-19T08:03:55.233Z","updated_at":"2026-06-19T08:03:56.670Z","avatar_url":"https://github.com/xpl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to run\n\n```\nnpm i\nnpm run dev\n```\n\n# What happens\n\nreact-refresh leaks FiberRootNodes from secondary renderers.\n\nWhen R3F's Canvas unmounts, react-refresh's onCommitFiberRoot sees a late commit (didError=true, !wasMounted \u0026\u0026 !isMounted) and adds the root to `failedRoots` / `helpersByRoot` — never cleaned up.\n\nClick the button, then observe all 16 values stay \"alive\" in dev mode.\n\nIn a production build (no react-refresh) they are properly GC'd.\n\nAfter pressing \"Collect garbage\" button in Devtools:\n\n\u003cimg width=\"1450\" height=\"575\" alt=\"Screenshot 2026-04-30 at 12 25 56 PM\" src=\"https://github.com/user-attachments/assets/ccfda8d2-87a0-4ef4-b5a2-7041c469a1cb\" /\u003e\n\n---\n\nIn production build (note the last value is still retained, [but that is a separate issue in R3F that I have investigated and reported](https://github.com/pmndrs/react-three-fiber/pull/3747)):\n\n\u003cimg width=\"1461\" height=\"436\" alt=\"Screenshot 2026-04-30 at 12 32 24 PM\" src=\"https://github.com/user-attachments/assets/e035655c-3342-4b5d-a13f-ea9a36383359\" /\u003e\n\n# Bug report\n\nhttps://github.com/facebook/react/issues/36379\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxpl%2Freact-leak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxpl%2Freact-leak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxpl%2Freact-leak/lists"}