Vue State Management with Composition API - No need for vuex & vuex-persist?

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ต.ค. 2024

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

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

    Nice tutorial straight to the point and good example used tired of Todo list app and counter examples.

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

    This was an AMAZING tutorial. I learned a lot from watching this. It really shows off how powerful the composition API is. Thank you!

    • @OdwallaJuice
      @OdwallaJuice 3 ปีที่แล้ว

      Just as an aside, I've been using props and event emits to pass shared data around components. I'm going to refactor my app to use this method for global state, it's so much cleaner!

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

    This is an awesome explanation. I not only learned the state management but also the use of computed & watch functions. I was a little confused about those. But now I understand properly. Hope more videos will come in the future

  • @maverickchan9552
    @maverickchan9552 3 ปีที่แล้ว

    EXACTLY what i need... great ! Nice Work man!

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

    wow, a DIY vuex. That is amazing. Wow if you combine this with emit and component communication, you can really do powerful things,

  • @MichaelJClegg
    @MichaelJClegg 3 ปีที่แล้ว

    Thank you for the clear presentation. I want to point out one problem early on (5:00 approx.) - the assignment: - const state = reactive(defaultStatus) in "useMovieState.js" line 11; caused an error msg: "can not make object reactive" - solution was to make the state const itself reactive rather than go through the assignment mentioned above. Thanks

  • @Anaxarchos
    @Anaxarchos 3 ปีที่แล้ว

    thanx for this great tutorial. It really helps to use the composition api as a replacement for vuex.

  • @adadaprout
    @adadaprout 3 ปีที่แล้ว

    Thank you so much it's very helpful, and clear.
    I have been learning vue 3 recently and I have been contemplating all the different possibilities for state management for a not so big app I am doing, and this solution seems awesome.
    Vuex seems a little bit overkill for me and I have so much to learn already with vue in itself that not having to add a new thing to learn (like vuex etc.) is a real good thing.
    The possibility of doing it directly with composition API is awesome.

  • @sania3631
    @sania3631 3 ปีที่แล้ว

    Thanks. Very helpful.

  • @marvin_e
    @marvin_e 3 ปีที่แล้ว

    this was awesome..thanks

  • @deger.ogretmen
    @deger.ogretmen 2 ปีที่แล้ว

    Tutorial is great! It is nice to see composition API works like Vuex. But I think this is sth like imitation of Vuex. Because vuex really store state data. For example, if you want to use this with i18n or sth else, you can not store en-US and de-DE string in a composition store state. You should always save it in the localstorage or your database. The state which is disappearing when you refresh the page is useless in my opinion. But thank you for great method explanation.

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

    loved the video myan. how about with Typescript too?

  • @GuitarristaBla
    @GuitarristaBla 3 ปีที่แล้ว

    Nice video, thanks for sharing. But what about the security issues with using local storage?

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

      If your website is not vulnerable to XSS you are safe. You shouldn't store sensitive data in the local storage, so you should be selective on what type of data you want to store in the local storage.

  • @ssahillppatell
    @ssahillppatell 3 ปีที่แล้ว

    Thanks

  • @pagevpetty
    @pagevpetty 3 ปีที่แล้ว

    can you include: edit movie title and update