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.

Page Route not refresh the template request data

See original GitHub issue

Environment

Nuxt CLI v3.0.0-rc.6

  • Operating System: Windows_NT
  • Node Version: v16.14.2
  • Nuxt Version: 3.0.0-rc.1
  • Package Manager: npm@8.12.1
  • Builder: vite
  • User Config: components, modules, css, plugins
  • Runtime Modules: @nuxtjs/tailwindcss@5.0.4, @nuxtjs/color-mode@3.0.3, nuxt-lodash@2.2.0
  • Build Modules: -

Reproduction

npm run dev

stackblitz link

Describe the bug

Page Route not refresh the template request data When I link to jump to another page I don’t have this problem when I use version 3.0.0-rc.1 Upgrade to 3.0.0-rc.6 There will be this problem useFetch request { data } data not refresh (Always the first requested data) Is the method changed? I use usefetch to request

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
JamieDIngcommented, Aug 4, 2022

I try to create one stackblitz link …Please wait

1reaction
matiyincommented, Aug 4, 2022

I can confirm the same issue, fetch data is not updated when changing routes in rc6. rc1 works, the current edge channel does not solve the issue.

/pages/[slug].vue:

  <main>
    <div v-if="pending">
      Loading ...
    </div>
    <div v-else >
      {{post}}
    </div>
  </main>
</template>

<script setup>
const { pending, data: post } = useLazyFetch('https://xxx')
</script>`
Read more comments on GitHub >

github_iconTop Results From Across the Web

angular - data is not updating on page after routing to same url ...
As you said that it is showing the new data after the refresh of the page, so in that case just try to...
Read more >
GET requests not updating on page reload - Django Forum
Hi, folks, I have a question and I'm not sure where else to go to research the solution. I've got a small project...
Read more >
Router tutorial: tour of heroes - Angular
This guide describes development of a multi-page routed sample application. Along the way, it highlights key features of the router such as:.
Read more >
Refresh Route Data API #1996 - remix-run/remix - GitHub
Bundle all dashboard data in a single request and reload it on the smallest interval. Infeasible for us as some parts of the...
Read more >
Angular: Refetch data on same URL navigation - Medium
In early Angular versions, there was no option to tell the router to emit events on same route refresh. Angular 5.1 introduced the ......
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