React Signals tutorial - practical guide

Поделиться
HTML-код
  • Опубликовано: 25 авг 2024

Комментарии • 31

  • @CodeWithAhsan
    @CodeWithAhsan  Год назад

    Do you think this is better than Redux? Or will you keep using Redux? Or is there a different State Management library that you prefer?

    • @greekapostle4548
      @greekapostle4548 Год назад +1

      I prefer angular forever 😍

    • @CodeWithAhsan
      @CodeWithAhsan  Год назад +1

      @@greekapostle4548 hahah!! For sure!!! Angular FTW

    • @naseeriyat9241
      @naseeriyat9241 Год назад +1

      It will be a bit difficult to shift from reduced 😊

    • @CodeWithAhsan
      @CodeWithAhsan  Год назад +1

      Changes are always difficult. True

    • @JakubSK
      @JakubSK 10 месяцев назад +1

      No need for redux with the native components built into React for a while now.

  • @codemonkeynorth7503
    @codemonkeynorth7503 4 месяца назад +1

    Better to just use {count} instead of {count.value} in your jsx part, because it doesn’t cause the whole component to rerender on change, it just updates that placeholder

  • @garcipat
    @garcipat 17 дней назад

    Is this with the AuthSignals the recommended way to store the values?

  • @question_ij
    @question_ij 8 месяцев назад +1

    Hi...i love ur video could you tell me how u edited, mostly putting ur social handle in d video. Thanks

  • @riddy6421
    @riddy6421 9 месяцев назад +1

    Nice Video. I'm trying to use signals, but it seems they don't work with `react-navigation` ?

    • @CodeWithAhsan
      @CodeWithAhsan  9 месяцев назад

      What error did you face with signals and React navigation ?

  • @pranjuljain6025
    @pranjuljain6025 5 месяцев назад +2

    First time in my life where library(@preact/signals-react
    ) is not working

  • @brencancer
    @brencancer Год назад +1

    great content

  • @mognomoinak1309
    @mognomoinak1309 13 дней назад

    Hi Ahsan, can you please share the source code on github or something similar. I would be very greatful.

  • @SahraClayton
    @SahraClayton Год назад +1

    Do Preact signals work with React version 18, I can't remember who's video I watched but I thought they said that signals do not work with React concurrent mode. I might of heard that wrong.
    They do look very good though, seems to solve some of React's problems.

    • @CodeWithAhsan
      @CodeWithAhsan  Год назад

      Yeah, they definitely solve the prop drilling and state management issues. Even out of the components’ scope.
      I tested it with the latest version of React in this video. I haven’t specifically tested with a deep dive in concurrent mode yet

    • @SahraClayton
      @SahraClayton Год назад

      @@CodeWithAhsan Thanks for replying, sorry but could you tell me a brief overview of what React concurrent mode is. I am new to web development and the coding bootcamp I am on hasn't covered what concurrent mode is.

  • @tonyohagan1195
    @tonyohagan1195 Год назад +1

    Wow! React has caught to Vue.

    • @CodeWithAhsan
      @CodeWithAhsan  Год назад

      Looks like it.
      And we have Angular introducing signals soon too. Exciting times!

  • @yabuking84
    @yabuking84 6 месяцев назад

    Maybe add which signals package to install. Not sure why you skipped that.

  • @AbdulBasit-to2xr
    @AbdulBasit-to2xr 9 месяцев назад

    It updates the value like "count.value++". Does it mean it does update the value in a mutable way?
    what if we have a complex data like
    var foo = signal({ a: 1, b: 2, d : { e: 5 } })
    should I have to update the original object like foo.value.d.e = 10 // update the e value ??

    • @olesodynets979
      @olesodynets979 8 месяцев назад

      Signals can be nested.
      So in this example it would be: signal({ a: signal(1), b: signal(2), d: { e: signal(5) } })
      Or, if you're planning on updating "d": signal({ a: signal(1), b: signal(2), d: signal({ e: signal(5) )} }) // Wrapped "{e:signal(5)}" into another signal
      ----
      I recon, this approach will lead to a lot of pain when trying to manage complex states.

  • @EthanStandel
    @EthanStandel Год назад +3

    Shameless plug, but if you want Signals to scale like a full state management solution, you grab preact-signal-store. Currently it only supports Preact, but I'm working on converting it to a monorepo that exports a package that works with React as well.

  • @question_ij
    @question_ij 8 месяцев назад +1

    Hi...i love ur video could you tell me how u edited, mostly putting ur social handle in d video. Thanks

    • @CodeWithAhsan
      @CodeWithAhsan  8 месяцев назад

      Hey there.
      I use davinci resolve for editing my videos :) I had the overlay (with green screen) created from a video editor. I just use that in all videos now.

    • @question_ij
      @question_ij 8 месяцев назад

      Okay thank you

    • @question_ij
      @question_ij 8 месяцев назад

      Have a second question. I tried coding along but I got stuck it not working or updating I use react18 I don't know why.
      Thank you