Content update on React navigation
Author: freganteCreated Jul 28, 2026Updated Sep 29, 2026
Labelsmeta
- continues https://github.com/refined-github/refined-github/issues/6554
- extracted from https://github.com/refined-github/refined-github/issues/9860#issuecomment-5021961376
This issue is about two related bugs:
observeremains active on views where it shouldn't run (example)- components Svelte remain in memory and still listening to events like URL changes
Svelte component issue
When I mount() components the first time and then they're removed by GitHub, they're still in memory but dormant, potentially garbage collected if we're lucky.
However with self-updating components, they continue to self-update even when not attached to the document.
Repro
- Open https://github.com/refined-github/refined-github/blob/main/source/features/action-pr-link.tsx
- Click on the "Features" folder
- Click on another feature in the sidebar
the previous component is still updated in memory even if rendered nowhere. This specifically happens because GitHub is removing the first one, so observe will mount a new one.
Source: refined-github/refined-github