Peter Graugaard
Overwriting auto-generated RuntimeConfig type
Hi!
How do I overwrite the types for runtimeConfig in nuxt.config.ts with my custom type?
The example in the docs is seems incomplete or at least doesn't work for me:
https://nuxt.com/docs/guide/going-further/runtime-config#manually-typing-runtime-config
I tried creating an index.d.ts file in the root of the project and deleting the .nuxt folder and restarting the dev server, but that didn't work for me. I haven't made a .d.ts file before so maybe I'm just doing it wrong.
1 replies
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?
3 replies