Unlocking Powerful State Management in Nuxt 3 with Pinia

Поділитися
Вставка
  • Опубліковано 15 жов 2024

КОМЕНТАРІ • 66

  • @zulfakamal7048
    @zulfakamal7048 Рік тому +6

    I need lots of nuxt3 tutorials like this ...

  • @AzeezGafar
    @AzeezGafar Рік тому +2

    The way you broke it down from start to finish is awesome, well done 👍🏾

  • @pi-dev5079
    @pi-dev5079 Рік тому +4

    You are brilliant - so many useful tips and tricks as well as the tutorial! Subscribed and Liked!

  • @frankjuuh
    @frankjuuh 10 місяців тому +1

    Big love, man. Thanks for walking through it step by step, and awesome wallpaper 💪

  • @sunwarulislam7402
    @sunwarulislam7402 4 місяці тому +2

    Thanks for the well explained video. Helped a lot. Please make more. Thanks.

  • @carlosguzmanrojas707
    @carlosguzmanrojas707 10 місяців тому +1

    thanks a lot for your contribution to frontend devs likes me!!!

  • @SantiagoMartinez-dn7kj
    @SantiagoMartinez-dn7kj 4 місяці тому

    Amazing video, The way you explain and the tools that you used make the learning a great experience

  • @abdvlkadr
    @abdvlkadr 9 місяців тому

    Great video! i'm having troubles setting up the auth middleware. it doesn't seem to work for me. i can still access routes when not logged in.

  • @migotrobert6952
    @migotrobert6952 8 місяців тому +2

    nicely done 👏, thanks for the tutorial

  • @HamzaAslam-f9o
    @HamzaAslam-f9o Рік тому +1

    Amazing content. Appreciated 👍🏻. I was looking for this.

  •  Рік тому

    Please, make a video telling us what extensions you're using ! Thank you for the content! That is amazing!!

    • @breezycodes
      @breezycodes  Рік тому

      I will be sure to go over the extension at the start of the next video :)

  • @mipsdku_wildanmauluddana1654
    @mipsdku_wildanmauluddana1654 Рік тому +1

    Hello, great tutorial!, Want to ask some question
    When i try to log the res it does nothing nothing get logged then how to handle the status code?(i.e: 200/OK, 400/BadRequest and so on using $fetch) because i have different result so i could pass any generic type in my $fetch. Thanks!

    • @breezycodes
      @breezycodes  Рік тому +1

      This was tricky for me when I started using the $fetch composable. Luckily, the docs for it can be found here: github.com/unjs/ofetch. To handle errors, you can do
      await $fetch("/url").catch((err) => err.data);
      To ignore the error, you can do
      await $fetch("/url", { ignoreResponseError: true });

  • @edzomejunior192
    @edzomejunior192 3 місяці тому

    Very great job guy, thank you so much.........

  • @abdvlkadr
    @abdvlkadr 9 місяців тому

    Hell, great video. Please which plugin did you use 07:58 minute to create the nuxt project directories. thank you

    • @breezycodes
      @breezycodes  9 місяців тому +1

      The extension is called Nuxtr 😊

    • @abdvlkadr
      @abdvlkadr 9 місяців тому

      @@breezycodes thanks, I've got it installed but I'm unable to see these options when I right click. I'll do some snooping around, hopefully I get it fixed.

  • @abdalkhalekchamkha3622
    @abdalkhalekchamkha3622 2 місяці тому

    Useful and well explained

  • @codedjango
    @codedjango Рік тому +1

    Can you please mention what VS code extension you are using to create this Nuxt app? Thanks

    • @breezycodes
      @breezycodes  Рік тому +1

      I think I did.. it's the Nuxtr extension. Here I'd a link to it marketplace.visualstudio.com/items?itemName=Nuxtr.nuxtr-vscode

  • @VELIXYZ
    @VELIXYZ Рік тому +1

    Great and modern tutorial🎉

  • @PeshelGomo
    @PeshelGomo Рік тому

    Thank you for this. How can i get data persistently so that i can keep the data even after refresh.

    • @breezycodes
      @breezycodes  Рік тому

      You are welcome. I see this nuxt module called pinia-plugin-persistedstate that should be able to do what you are looking for. Here is the link to the docs for it: prazdevs.github.io/pinia-plugin-persistedstate/frameworks/nuxt-3.html

  • @kooyaw4445
    @kooyaw4445 9 місяців тому +1

    Incredible

  • @guillermomazzari8320
    @guillermomazzari8320 Рік тому

    Thank you very much for sharing, I am a C# developer and I love Vue, I want to move to Nuxt3, would you happen to have a full course using vuetify3?

    • @breezycodes
      @breezycodes  Рік тому +1

      YW. I was a C# dev a few years ago lol. Honestly, Vuetify 3 and Nuxt are in a shakey place right now. A good module was developed by a random dev in the community and I am exploring it right now. I will be making a video on it soon

    • @guillermomazzari8320
      @guillermomazzari8320 Рік тому

      @@breezycodes Oh, ok, so you would recommend using tailwind instead, at least meanwhile?

    • @breezycodes
      @breezycodes  Рік тому +1

      @guillermomazzari8320 yes. The problem that you ate going to face with Tailwind is that you will be creating components from scratch over and over again. To combat this, I would recommend creating a starter kit with your own reusable components.

    • @guillermomazzari8320
      @guillermomazzari8320 Рік тому

      @@breezycodes I understand, I am used to using tailwind, no problem there, thanks for answering!

  • @danialwafiy1014
    @danialwafiy1014 Рік тому +1

    sorry, on your auth plugin, u made a check to fetch the user info whenever the app reloads. On my end, I made an express api that returns a http only cookie to the browser once login is successfuly. How do I pass the http only cookie to the express api to fetch my user? I want to do a similar thing where it fetches the user info whenever the app reloads but I need the http only cookie to be passed. I tried it on my end and it looks like on the server side, the http only cookie is not available

    • @breezycodes
      @breezycodes  Рік тому

      Hey there. You are correct, the http cookie will not be passed on the server by default. This can be fixed. You need to pass the cookies on the server side by using the "useRequestHeaders()" composable to get the cookie on the server and send it in the the express server. Visit here: nuxt.com/docs/api/composables/use-request-headers to see how it works.
      All you have to do is get the headers from the client like so:
      // get the cookie only from the headers
      const headers = useRequestHeaders(['cookie'])
      And then send the request with the credentials property set to "include" along with the headers.
      Let me know if this works

    • @breezycodes
      @breezycodes  Рік тому

      I also did it in this repo here: github.com/BayBreezy/nuxt-3-auth-payloadcms/blob/main/client/composables/payload.ts#L99
      I explained it somewhere in this video: ua-cam.com/video/HTU5d4sJdwI/v-deo.html&ab_channel=BehonBaker

    • @danialwafiy1014
      @danialwafiy1014 Рік тому

      @@breezycodesthank you, its working. I also noticed that if you put await $fetch() into a function, lets say
      const getPosts = async() => await $fetch()
      and call getPosts, the script is only run on the client side, not the server.

  • @КириллЧесноков-э3ж
    @КириллЧесноков-э3ж 10 місяців тому +1

    thanks you man!

  • @caioalves8319
    @caioalves8319 Рік тому

    Is there a way to make a video teaching how to install StoryBook in Nuxt 3?

  • @learn.setyawannn
    @learn.setyawannn 4 місяці тому

    did someone know how to get loading while fetching the data?

  • @brunoemre
    @brunoemre 11 місяців тому

    how to do this for so many users, which data to get where to get the datas

  • @caioalves8319
    @caioalves8319 Рік тому +1

    Very good

  • @domo99ify
    @domo99ify 11 місяців тому

    how can i get the Vue tab in the inspector?

  • @azizsobirjonov4462
    @azizsobirjonov4462 Рік тому +1

    Great 💯💯💯

  • @thecaribcoder
    @thecaribcoder 11 місяців тому

    For some reason my logout function doesn't set the cookie for the token to undefined. Have the same code as you, any ideas?

    • @breezycodes
      @breezycodes  11 місяців тому

      I will check with the updated nuxt version & let you know in a few

    • @thecaribcoder
      @thecaribcoder 11 місяців тому

      @@breezycodes ok thanks! appreciate the response. i'm a fellow Caribbean coder btw. Bahamas here :)

    • @thecaribcoder
      @thecaribcoder 11 місяців тому

      Hey any idea? Not sure if anyone else has had this problem. Going to try and use the package directly from vueuse to see if that works

    • @breezycodes
      @breezycodes  11 місяців тому

      @@thecaribcoder Can you try passing null or undefined to the setUser & setToken functions to see if that will make a difference?

    • @thecaribcoder
      @thecaribcoder 11 місяців тому

      @@breezycodes Made no difference unfortunately, weird! Still trying to figure this out just working around it at the moment

  • @ahmadmraish5834
    @ahmadmraish5834 6 місяців тому

    Hello friend, you need to update this video, a lot of configurations are no longer valid.

  • @MrSimmalarie
    @MrSimmalarie 2 місяці тому

    Repo? Thanks

  • @amrwery5403
    @amrwery5403 Рік тому

    sorry you said what this nuxt extaintion name is ?

  • @freekeys
    @freekeys 4 місяці тому

    Quasar UI is still best for vue/nuxt ❤

  • @kresnaagisna3995
    @kresnaagisna3995 Рік тому

    Why do we really need to define our store in plugins? What is plugin anyway

    • @breezycodes
      @breezycodes  Рік тому

      Well, you do not need to define your store in the plugins folder. You can create it anywhere and use it withing your app. You can even ditch Pinia and use Nuxt's composables to achieve the same thing

    • @kresnaagisna3995
      @kresnaagisna3995 Рік тому

      @@breezycodes but it throws an error when I didnt declare my store inside plugins. I'm so lost 😁

    • @breezycodes
      @breezycodes  Рік тому

      @kresnaagisna3995 that's odd. Can you create a minimum reproduction on stackblitz for me? That way we can look at it together

  • @srweb12
    @srweb12 10 місяців тому

    is there a github repo for this?

    • @breezycodes
      @breezycodes  10 місяців тому

      Umm.. Sadly I deleted the code because it wasn't a full project.. my bad

  • @agengp9233
    @agengp9233 10 місяців тому

    wow, thanks sir

  • @виртуоз_ру
    @виртуоз_ру Рік тому

    👍