Uh oh!
There was an error while loading. Please reload this page.
feat(nuxt): make useFetch options reactive - #8374
Conversation
|
✅ Deploy Preview for nuxt3-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
JorenSynaeveTM
commented
Oct 25, 2022
Hi Daniel. I don't know where to respond, so I'm posting my question here. I'm having issues getting this to work. I have the following code in my page: When trying to extract this logic to a custom composable for better error handling and adding a bearer token, it stopped working. Here is my custom composable: Could you please take a look on why this is not working? |
danielroe
commented
Oct 26, 2022
yes, this is probably not the right place. if you have a follow-up question, would you open a discussion instead? you should instead do something like this: const{ pending, data }=awaituseAsyncData('test','/api/productlist',{params: {
page,includeUser: true}})... and that should work, automatically watching |
yashika
commented
Nov 6, 2022
awesome! |
AaronConlon
commented
Nov 8, 2022
Waited a long time. |
AaronConlon
commented
Nov 8, 2022
Thanks bro |
🔗 Linked issue
resolvesnuxt/nuxt#14342
❓ Type of change
📚 Description
This allows passing refs/computed properties as fetch options (e.g. for a param value), and automatically refetching when these values change.
📝 Checklist