Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak with navigation from parent route #3056

Open
faridsaid20 opened this issue Dec 23, 2024 · 0 comments
Open

Memory leak with navigation from parent route #3056

faridsaid20 opened this issue Dec 23, 2024 · 0 comments

Comments

@faridsaid20
Copy link

Which project does this relate to?

Router

Describe the bug

Getting detached nodes when navigation from specific parent components

example path

/
-----/settings
----------------/settings/volume
----------------/settings/video

If I navigate with Links from /settings to its children, then it will create a lot of detached nodes
If i navigate with Links from /settings/volume or /settings/video then it's ok

Your Example Website or App

https://stackblitz.com/edit/github-txkpx7fm-jgzkk4qc?file=src%2Fapp.tsx

Steps to Reproduce the Bug or Issue

Check the Video

Expected behavior

Should not generate detached nodes...

Screenshots or Videos

memoryLeak.mp4

Platform

  • OS: Windows
  • Browser: Chrome
  • Version: Version 131.0.6778.140 (Official Build) (64-bit)

Additional context

I could also reproduce similar memory leak with react-router v6 and v7. Will create a case for them too.
So there might be a problem with React itself, but I'm not sure.

@faridsaid20 faridsaid20 changed the title Memory leak with navigation from parent link Memory leak with navigation from parent route Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant