DOM is sometimes destroyed when navigating between routes
See original GitHub issueEnvironment
- Operating System:
Linux
- Node Version:
v16.14.0
- Nuxt Version:
3.0.0-rc.6
- Package Manager:
yarn@3.2.2
- Builder:
vite
- User Config:
head
,typescript
,modules
,runtimeConfig
,hooks
,build
,alias
,vite
- Runtime Modules:
@nuxtjs/tailwindcss@5.3.1
- Build Modules:
-
Reproduction
https://github.com/fabis94/djw3c-frontend-nuxt/commit/3c7f0f7a54be28da7856ac4091ff3e826029865c
Describe the bug
- yarn dev
- go to http://localhost:4000/about
- then switch to /releases through the navbar
- the body of the page is gone, even when you continue switching to other routes, the DOM Is destroyed and you get errors about this in the console 4b. if nothing happened, just try walking around the website through the nav bar a few times and you’ll def see the issue
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Element doesn't get destroyed on router navigation after ...
Element doesn't get destroyed on router navigation after manipulating DOM · Make sure the URL it's at the root and not within a...
Read more >Force Component Destroy by Using Page Life Cycle in ...
In a NativeScript Angular application, when you navigate between top-level components, they are placed on a stack and kept in memory. This is ......
Read more >Angular: Refetch data on same URL navigation - Medium
The first approach is to tell the Angular router to emit the route events on refresh and then handle them accordingly in our...
Read more >Ultimate React Router v6 Guide
The nice thing about React Router is that when you navigate between pages it will only refresh the content inside your Routes component....
Read more >Routing & Navigation - ts - GUIDE - Angular
The Angular Router enables navigation from one view to the next as users ... you almost always arrange to unsubscribe when the component...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Gotchu! https://github.com/nuxt/framework/pull/5469
I don’t believe there was any change in RC that should affect this. We have a pending PR to improve DX on this: https://github.com/nuxt/framework/pull/5469.
We also have a PR to allow disabling transitions by default in Nuxt: https://github.com/nuxt/framework/pull/5859