question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DOM is sometimes destroyed when navigating between routes

See original GitHub issue

Environment


  • 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

  1. yarn dev
  2. go to http://localhost:4000/about
  3. then switch to /releases through the navbar
  4. 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:closed
  • Created a year ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
danielroecommented, Aug 22, 2022
1reaction
danielroecommented, Aug 22, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found