Thank you again, I really like your videos and examples, even though I watched all it will be helpful to include the link or the video when you mention it :) Thanks again for keeping it going 🙏
@TheAlexLichter6 ай бұрын
Thanks for the suggestion! I include all links in the descriptions and videos as cards in the corner of the video (+ in the description ☺️)
@KefiVitcH7 ай бұрын
Your content is great and the way you explain things is awesome ! here is a small advice: thhe noise cancelling is cutting some words some time. You may need to reduce it ;)
@TheAlexLichter7 ай бұрын
Thanks for the tip! Will revisit my gate settings 👌
@DavidDeSloovere7 ай бұрын
For other that may wonder, I asked copilot “Why the name $fetch?” Instead of ofetch: - The name $fetch is chosen for consistency and ease of use. - It aligns with Vue’s convention of prefixing instance properties with a dollar sign (e.g., $data, $props, $emit).
@AksoomHussain78667 ай бұрын
your videos are great help to understand behind seen, nowadays i see most nuxt video cover composables and predefined function majorly , i would like you to explore layouts as it seem less explored part of nuxt like implementing persistence layout, nested layout and hook functions in nuxt, may be your tricks help in IRL work
@TheAlexLichter6 ай бұрын
Glad they help 🙏🏻 I put nested layouts on the list 👍🏻 Hooks are also interesting but they need specific use cases ☺️
@codewithguillaume7 ай бұрын
Yess!!!!!
@TheAlexLichter7 ай бұрын
Haha, waited for this one for a while? 😁
@freekeys3 ай бұрын
useAsyncData is more like useEffect in react that has watcher
@alimaher17 ай бұрын
As always, great content! Also, I have a question; Is it okay to use Nuxt with complete Client side rendering (Full SPA)? In my work, they can't afford ssr, should I go with nuxt to get all the benefits or it would be overhead?
@TheAlexLichter7 ай бұрын
Yes, absolutely! You can build a plain old SPA with Nuxt if you don't need SSR!
@Tarabass7 ай бұрын
Nice video, as always! How do you do that, talking at conferences and posting video's on yt at the same time lol 😅
@TheAlexLichter7 ай бұрын
Haha, just because I am not there I can't let the people wait for the content 😁 Though I didn't do many announcements around (will do that on Monday) Was nice meeting you in person!
@shuanwang42276 ай бұрын
This is very helpful! Thank you always.
@TheAlexLichter6 ай бұрын
You're so welcome! 🙌
@barbapapazes7 ай бұрын
Perfect explanation once again! 👌
@TheAlexLichter7 ай бұрын
Thank you! 🙌
@QueeeeenZ7 ай бұрын
It would also be nice to see how to build useAsyncData from scratch and how it works under the hood.
@TheAlexLichter7 ай бұрын
Great idea! Added to the list 👌
@virusblitz7 ай бұрын
Amazing video as alsways! Perfect topic as always :D
@TheAlexLichter7 ай бұрын
Glad you think so! 👌 Let me know if you have any ideas or topics in mind!
@Дмитрий-л4с9хАй бұрын
Thank you for your video! Could you please give me an advice. I wanna make the app which can be managed in both directions: if i change my reactives, data will changes and if i come from another page with pre-set query, the data should be correct. Struggling with that 😵 P.s. Using useAsyncData
@TheAlexLichterАй бұрын
You are welcome! Both ways should work by "watching" the route query I'd say 🤔
@chstappert7 ай бұрын
Thanks a lot for this important insight!
@TheAlexLichter7 ай бұрын
Glad it was helpful! 🙌
@MrSimpleCF7 ай бұрын
I love you man, always helpful and super insightful
@TheAlexLichter6 ай бұрын
You are welcome! Glad I can help 🙏🏻
@jahongirsalimov95877 ай бұрын
awesome as usual! Thank you !
@TheAlexLichter7 ай бұрын
Thank you! Glad it helps 🙌
@nhs119nhs1197 ай бұрын
Like your videos more and more, great job as always!
@TheAlexLichter7 ай бұрын
Thank you very much! Is there anything on your mind that could be better? 😊
@barbapapazes7 ай бұрын
That thumbnail is so fun 😂
@TheAlexLichter7 ай бұрын
A hilarious one every now and then 😛
@buxtehude5787 ай бұрын
Thank you. Could you kindly elaborate on why the useFetch function isn't universally applicable? It feels like a design flaw ... akin to React's approach, requiring users to be aware of specific exceptions, e.g. when dealing with all of their hooks.
@TheAlexLichter7 ай бұрын
What exactly do you mean with "isn't universally applicable"? That you can only use it in a Vue context? 👀 (Related: kzbin.info/www/bejne/pJvWeImjmLypn7s )
@buxtehude5787 ай бұрын
@@TheAlexLichter Thank you for getting back. As highlighted in both the documentation and the video, it's emphasized that useFetch is intended for data fetching in a component setup function, while $fetch is better suited for making network requests triggered by user interaction.
@gomesbruno201Ай бұрын
so, is useAsyncData like react's useMemo with a different life cycle?
@fmoessle7 ай бұрын
as always: thank you :)
@TheAlexLichter7 ай бұрын
My pleasure! 😊
@gabrielserejo83797 ай бұрын
nice video alex!
@TheAlexLichter7 ай бұрын
Glad you enjoyed it 😋
@LB-q7m3 күн бұрын
Hi great tutorial. I am using useAsyncData with a handler function that performs multiple $fetch's within to populate page data (as I am hitting a few different apis). But when in my /server/api route I am seeing it is getting called twice. Any ideas on a solution?
@TheAlexLichter2 күн бұрын
Do you possibly have 2 components calling the same API?
@LB-q7m2 күн бұрын
@@TheAlexLichter I think I got the issue sorted on dev mode. But I notice on prod it's hitting the API twice, almost like it's rendering the page twice or hitting it client and server side at the same time.
@_parassolanki7 ай бұрын
It would be nice to have composable for mutation like `useMutation` available in tanstack query currently for mutation we can't use useFetch and it does not success, error callbacks.
@TheAlexLichter6 ай бұрын
You could use useFetch with interceptors though, couldn't you? 🤔
@ArnoldGotClips7 ай бұрын
'DX' is short form for what?
@TheAlexLichter7 ай бұрын
Developer Experience ☺️
@ElTebe7 ай бұрын
How can the above methods be leveraged, for example, in the case of an AWS Amplify GraphQL call?
@TheAlexLichter7 ай бұрын
Same idea, but using POST. I'd probably use a dedicated GQL lib/module though
@DevMarques7 ай бұрын
Great video as always. How would you leverage useFetch with a repository pattern? My whole repository file is sustained on something like this and the same query might at some point be triggered by user interaction (which triggers a warning when using useFetch) or just plain data fetching (which works just fine): import type {$Fetch, NitroFetchRequest} from 'nitropack' import type {ApiResponse, ApiResponseWithCursorMeta} from "~/types/responses.generics.interface"; export const eventsRepository = (fetch: $Fetch) => ({ async get(cursor: null | string = null): Promise { let url = '/events/'; if (cursor) { url += `?cursor=${cursor}` } return fetch(url) }, })
@TheAlexLichter7 ай бұрын
Thank you! I'd go with useAsyncData as shown in kzbin.info/www/bejne/oImraYeoYsqrnqs 😊
@vensonhunt6 ай бұрын
if the url is build upon query, which is not the options of useFetch, how to make it work
@TheAlexLichter5 ай бұрын
How do you mean that? You can pass it to useFetch anyway ☺️
@mr.developer6174 ай бұрын
Thank You
@TheAlexLichter4 ай бұрын
You're welcome 👌
@elviskemboi76687 ай бұрын
am trying to use fetch with a laravelapi and when i run my nuxt app i get that useFetch component has already been mounted see the $fetch what can i do about this
@TheAlexLichter7 ай бұрын
My video about useFetch should help you there! kzbin.info/www/bejne/pJvWeImjmLypn7s 🙌
@yoskokleng365811 күн бұрын
so headache, i would use axios instead :)).
@TheAlexLichter11 күн бұрын
Keep in mind that axios is comparable to $fetch but not to the fetching composables like useFetch or useAsyncData
@nanaassumadu49977 ай бұрын
ow God I love you
@TheAlexLichter6 ай бұрын
🙏🏻🙏🏻🙏🏻
@jurarexx7 ай бұрын
@TheAlexLichter7 ай бұрын
Because it is checked (up to) 3x in the code 😊 Does that cause an issue? I briefly talked about that in kzbin.info/www/bejne/iqacg2Ntad-DsJI too 🙌