A Better Approach To Data Fetching In Nuxt?

Ғылым және технология

🤖 WebDevDaily: www.webdevdaily.io
📕 Nuxt 3 Course: www.learnnuxt.dev/
📕 Vue 3 Crash Course: johnkomarnicki.gumroad.com/l/...
🚀 Join the channel : / @johnkomarnicki
🤖 Website: johnkomarnicki.com/
🐦 Twitter: / john_komarnicki
Data Fetching with Nuxt: • Data Fetching With Nuxt 3
#vue #vue3 #datafetching #nuxt #nuxt3

Пікірлер: 24

  • @jatinkumar7287
    @jatinkumar72872 ай бұрын

    Working on nuxt and having to found u is a blessing. I don't know why there are so little vuejs or nuxtjs tutorial on youtube.

  • @devflo

    @devflo

    2 ай бұрын

    I actually create nuxtjs tutorial on my channel would add more soon

  • @YessenOrazbaiuly
    @YessenOrazbaiuly2 ай бұрын

    Very useful info. Thank You!

  • @alimaher1
    @alimaher12 ай бұрын

    Great video, John and I totally agree with you. Blocking the page untill the data is fetched does not make a great UX. Also, it's important to note that this behavior relies on async setup, top level await and suspense component. As there could be some caveats that require knowledge of these to deal with them.

  • @JohnKomarnicki

    @JohnKomarnicki

    2 ай бұрын

    Thanks, yeah i agree! I assume that if you're watching this video you'd have some familiarity with these concepts. But if not, i feel Nuxt is pretty intuitive to allow you to have little knowledge and still understand. I also have videos on most of these concepts as well :)

  • @alimaher1

    @alimaher1

    2 ай бұрын

    @@JohnKomarnicki Yeah totally agree. And I've been here for a while and I could assume I watched most of your videos. Love your content, man. Btw I have some concern regarding using useFetch for client side api data fetching. I know it's recommended, acc to docs, to use $fetch instead but what if I wanted to get the benefits of using useFetch. Nuxt do warn "Component is already mounted, use $fetch instead.". What do you think regarding that? I pass that 'server: false' to useFetch but still the warning persists.

  • @zooldeveloper
    @zooldeveloper2 ай бұрын

    It's great video thank you

  • @youhan96
    @youhan96Ай бұрын

    Great tip. I guess pending is going to be replaced by status==='pending' in v4

  • @berkaykarademir8641
    @berkaykarademir8641Ай бұрын

    you are the best easily. thanks for sharing better approaches instead of just talking about how to do things in the most primitive way

  • @JohnKomarnicki

    @JohnKomarnicki

    24 күн бұрын

    I appreciate that!

  • @dave_an
    @dave_anАй бұрын

    Thanks man

  • @mathiasokafor7318
    @mathiasokafor73182 ай бұрын

    great video

  • @RomFeliciano
    @RomFelicianoАй бұрын

    Hello sir can you make a video about nuxt apollo? I am trying to initially fetch my data using useAsyncQuery but when I reload the page the data are gone but when using going back to that page displayed my data

  • @yoanestradablanco1608
    @yoanestradablanco16082 ай бұрын

    Good VIdeo

  • @user-yy8kf5gu8u
    @user-yy8kf5gu8uАй бұрын

    I was wondering, when using useFetch it is universale rendering, when is it doing ssr and when is it doing csr? Because if you have a loading screen it is basically doing csr which is not great for seo right?

  • @JohnKomarnicki

    @JohnKomarnicki

    Ай бұрын

    As you mentioned, Nuxt has universal rendering. The initial page load will happen on the server and then after that it’s client side. This approach just helps provide a better user experience after the app has been loaded initially. UseFetch handles fetching the data on the server and then it passes that data to the client without refetching when the app hydrates.

  • @user-yy8kf5gu8u

    @user-yy8kf5gu8u

    Ай бұрын

    @@JohnKomarnicki Thanks!

  • @matanon8454
    @matanon84542 ай бұрын

    💚

  • @виртуоз_ру
    @виртуоз_ру2 ай бұрын

    👍👍👍👍👍👍👍👍

  • @madukomablessed4712
    @madukomablessed47122 ай бұрын

    awesome video. Would love to use Nuxt and Go on a project. Also, is it possible to make a full stack Nuxt app (using server pages and the likes)

  • @devflo

    @devflo

    2 ай бұрын

    it is possible to have server routes and actions it is a complete full stack framework

  • @madukomablessed4712

    @madukomablessed4712

    2 ай бұрын

    @@devflo Yeah I know, I mean he should make a video on those, as a project

  • @devflo

    @devflo

    2 ай бұрын

    @@madukomablessed4712 okay, he has a few projects but not sure he has one where he used the full nuxt

Келесі