You're Probably Using Nuxt Wrong

preview_player
Показать описание
RESOURCES

Get early access to videos, exclusive content, interactive code challenges, and more.

follow me on twitter

#vuejs #vue #javascript #webdev
Рекомендации по теме
Комментарии
Автор

Mh .. still not clear to me, do we need to add the await or not?

svenst
Автор

This really clarifies things. Nuxt team should add link to this video in their docs.

AdarshMadrecha
Автор

Thanks for explaining it in such an easy way.

khakcsar
Автор

Thank you for the explanation.

Nuxt2 was easier to understand in that matter, I think.

You either used fetch() (and $fetchState.pending etc) for data fetch which doesn't block client navigation (and you have to assign the value to your data via this.datavar = yourfetchvalue), or asyncData() for navigation blocking (and you directly return the data you want that will be used in the template, without need to assign to a data). As far as I remember, that was it.

Now in 3 is confusing by having useFetch, useAsyncData, $fetch.. which in the end is all the same method, but it doesn't block because you can give lazy true.

RaphaelDDL
Автор

We should keep it simple, simplicity makes working with a framework nice.

universe_decoded
Автор

Love this, thanks for the explanation!

mohaab
Автор

I'm still confused. I definitely have to watch this video more than once. Thank you.

odmtqry
Автор

thanks for this great video, it will be much better if u provide some examples and code with pinia and ssr cuz still i am confusing how to use pinia and requests on ssr

Bawaromerali
Автор

I have been using $fetch exclusively in cases when fetching is triggered by user actions, inside functions. But can we avoid using $fetch altogether by passing proper options to useFetch?

jaker
Автор

Timely video! Currently migrating a project from Vue2 to Nuxt3 and I did struggle to know which composable to use where.

Thanks for an easy explanation of such a complex topic. Always love this clean demonstrating videos! ✨

pratikrane
Автор

This explains a lot for me, thank you

shadkamel
Автор

Hi, on a side note, does using server:false mean it wont get rendered on the server hence no SEO ? because for me what I do now is if I want the content data to NOT BE "SEOABLE", I'll set server:false, else I'll just use default. Not sure if this is the right concept.

danialwafiy
Автор

Why is server side navigation / initial request blocked when using useLazyFetch / useLazyAsyncData?

StrMsk
Автор

Guys, could anyone tell me which font and theme author uses?

Slotherinee
Автор

When using nuxt, do i need to use Axios and set global interceptors !?

khaledoghli
Автор

great video
i was confused about this for a while
now i understand it

THANK YOU! KEEP GOING!

mohammedzaid
Автор

Sorry but It's still doesn't clear to me, if its client side fetching then I think await is not needed, and it wont block navigation when its client side

nrtixpq
Автор

Is there also any trick when you need to pass authorization header for example? what would be the best solution in that case? do we create our own instance of useFetch, is it possible to set some global header somewhere in the config? What do you recommend?

Typical example when you have to login and then get some items.

TilenPirih
Автор

I’m still confused. Does “await” matter?

whathehck
Автор

Ok. Now the same but with some real dummy-app example not just abstractive theory pls! It's much easier to understand the abstraction if you have some peaches and apples to visualise those technical aspects :)

Nerlon