NgRx Signals Store: Angular State Management Made Simple

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

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

  • @CodeWithAhsan
    @CodeWithAhsan  4 หลายเดือนก่อน

    What is your go-to method for state management? Local observables? Local Signals? Shared Services? NgRx? NgRx Signals?

  • @MG-wx8yx
    @MG-wx8yx 2 หลายเดือนก่อน +1

    Great content, thank you so much.

    • @CodeWithAhsan
      @CodeWithAhsan  2 หลายเดือนก่อน +1

      @@MG-wx8yx awesome! I appreciate the feedback. Is there something else you want me to create content on?

    • @MG-wx8yx
      @MG-wx8yx 2 หลายเดือนก่อน +1

      @@CodeWithAhsan I have this problem, I'll appreciate it so much if you can help. I want to use data from the store to display in the chart, specifically, Chartjs. But I can't figure out how to get data in the component (.ts file) from the store, it's only available in the template (.html). How can I get the data in the component after the store has been patched with data?
      No matter how I do it, the variable from the store only prints the initial value, like if it was 0 or [] empty array, it will print that in the console. This makes it hard to use the store for displaying data in the chart, such as Chartjs chart because the data is not available in the component, only available in the template of the component. Thanks in advance.

    • @CodeWithAhsan
      @CodeWithAhsan  2 หลายเดือนก่อน

      @@MG-wx8yx Do you have a public repository I can see the code at?

  • @vOnez212
    @vOnez212 3 หลายเดือนก่อน +1

    Great video. Thanks for sharing! Do you have a PDF version of the book that get's updates?

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

      Thanks. Not at the moment.
      The book itself is pretty relevant still with all the recent advancements in Angular. Especially the core of it.
      Apart from signals, hydration, and a few more concepts

  • @veenz.filetti
    @veenz.filetti 2 หลายเดือนก่อน +1

    Thank you so much for the video. Clear and simple. What about a video that shows how to handle HTTP requests with signal store? :)

    • @CodeWithAhsan
      @CodeWithAhsan  2 หลายเดือนก่อน

      Great suggestion! I’ll look into it

  • @MG-wx8yx
    @MG-wx8yx 2 หลายเดือนก่อน

    My biggest issue is how to access the data from the store (signalstore) inside the component after the store is already initialized. No matter how I do it, the variable from the store only prints the initial value, like if it was 0 or [] empty array, it will print that in the console. This makes it hard to use the store for displaying data in the chart, such as Chartjs chart because the data is not available in the component, only available in the template of the component. Can anyone help?

    • @jamesrobb5827
      @jamesrobb5827 28 วันที่ผ่านมา

      This is a valid use case for effect, as it's the end of a reactive chain

  • @nemanjazivaljevic1656
    @nemanjazivaljevic1656 3 หลายเดือนก่อน +1

    Providing in parent component instead of a "root" is better. When we provide it in parent all children would have access to it and will be destroyed when parent is destroyed.

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

      Good point! Yes.

  • @musoverda
    @musoverda 4 หลายเดือนก่อน +2

    you present the material too quickly - it’s unclear who you’re telling it for

    • @CodeWithAhsan
      @CodeWithAhsan  4 หลายเดือนก่อน

      Thank you for the feedback. I will access it for future videos.

    • @eihamsalieba8662
      @eihamsalieba8662 3 หลายเดือนก่อน +1

      I could follow easily, but yeah for this you need to be focused 100% on the video. So a bit slower would be minimal better for the average person. But really nice tutorial 👍

    • @CodeWithAhsan
      @CodeWithAhsan  2 หลายเดือนก่อน

      @@eihamsalieba8662 awesome feedback :) I’ll remember in future videos