Proven Pinia Patterns - VueConf US 2023

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ส.ค. 2024
  • With Vue's new-and-improved state management library, we gain a much more modular tool. While being more flexible and lacking the Mutations of Vuex, Pinia presents us with more opportunities to be creative (for better or worse) with our app architecture and how state management is conducted and organized within it. This talk by Vue Mastery's own Adam Jahr explores some @posva-approved best practices and architectural design patterns to consider when using Pinia in production.
    Ready to master Vue.js? With weekly Vue js tutorials on the latest topics, and exclusive content with Evan You (the creator of Vue), Vue Mastery is the ultimate learning resource for Vue developers to level-up their skills. Watch more free Vuejs tutorials 👉 www.vuemastery.com/courses
    0:00 Intro
    3:39 When and why to use Pinia
    6:45 Options vs Setup stores
    11:02 Modular by design
    12:35 Store-ganization
    17:12 Accessing state
    21:31 Mutating state
    28:06 Other ways to work with Pinia
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 15

  • @kimballle7714
    @kimballle7714 ปีที่แล้ว

    nice! seems straight forward.

  • @ryans4584
    @ryans4584 7 หลายเดือนก่อน

    That @posva approved checkmark is ace 😀

  • @kenjohnsiosan9707
    @kenjohnsiosan9707 11 หลายเดือนก่อน

    thanks for sharing

  • @st3nsvk
    @st3nsvk ปีที่แล้ว +9

    I don't see any patterns in the course. It's just like going trough total basics from docs.

    • @heruhailiuhuang533
      @heruhailiuhuang533 ปีที่แล้ว +2

      Yes no more new insights. More advertising but it is ok for new pinia developer

    • @oemeraran8183
      @oemeraran8183 11 หลายเดือนก่อน +6

      I really find it hard to find good advanced patterns for vue 3 in general.. every tutorial or talk just scratches the surface and basically summarizes the docs.. how about solving some more complex problems by example...? All the content is made for complete beginners, which really annoys me lately.

    • @em9999999
      @em9999999 11 หลายเดือนก่อน +1

      @oemeraran8183 You'll find that Nuxt 3 solves most of those questions you might have automatically

  • @glatocha
    @glatocha 10 หลายเดือนก่อน +1

    Good talk, what software was used for the presentation? I like the animations a lot

  • @jlovas
    @jlovas 3 หลายเดือนก่อน

    Why don't you use the return block to create getters, actions and watchers in setup mode? Then you wouldn't have to list them separately.

  • @alibahrami6810
    @alibahrami6810 ปีที่แล้ว

    very very sweat talk 🍍

  • @balmberg
    @balmberg 9 หลายเดือนก่อน

    The presented store.js example (4:15) does not work. I'm having only a small use case where Pinia is overkill.

    • @sandorturbucz425
      @sandorturbucz425 6 หลายเดือนก่อน

      For a small use case just use composables, and/or provide/inject. Some say even for big use cases you only need composables, you can actually use it just like pinia aka a global state store.

  • @chil1181
    @chil1181 11 หลายเดือนก่อน

    How do I create a local store?

  • @DontFollowZim
    @DontFollowZim ปีที่แล้ว +3

    At 20:37, shouldn't that be userFavorites.value.push...?

    • @bergerblancsuisse.
      @bergerblancsuisse. ปีที่แล้ว +3

      No because userFavorites would have been initialised as shallowReactive([])