What is the correct way to do a 'Load more' button with useAsyncData?
Hi there,
We're doing a major migration from Nuxt 2 to 3 at work and I've run into a problem.
We have a list of posts and a button that loads the next 5 posts. What is the "best practice" way to do this?
I've created a small repro here: https://stackblitz.com/edit/github-yehzxq?file=app.vue
It works now but I'm unsure if it's the correct way to do this and if this will cause problems.
Is there an intended way to do this?
Best regards,
Peter
Edit: I found a problem: Calling the useAsyncData's refresh method seems to cause problems since it just appends duplicate data. Any ideas how to get around this?
2 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Great example. That's very helpful. Thank you!