React 19 Actions: Features You NEED To Know

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

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

  • @statixos2893
    @statixos2893 6 месяцев назад +2

    Very Well Explained .

  • @jatinmore3605
    @jatinmore3605 5 месяцев назад +1

    Great explanation

  • @BurkhardReffeling
    @BurkhardReffeling 6 месяцев назад +2

    Wouldn't you have to wrap your setTimeout function in a promise for this to work at 5:20? Otherwise I'd assume that isPending has already been flipped back to false if you check for it inside of the setTimeout callback (unless there's some other magic going on)

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

    Very nice one! Would love to teach the same way in Tamil to my folks! 💯

    • @shrutikapoor08
      @shrutikapoor08  6 месяцев назад +2

      Wohoo awesome! Let me know if you need help. I will create one in Hindi too. Do you have an editor?

  • @praveenscience
    @praveenscience 6 месяцев назад +1

    It's new for me to see an array being passed to the setTimeout's second parameter. I thought it's a number of milliseconds, but array? What does this mean?

    • @shrutikapoor08
      @shrutikapoor08  6 месяцев назад +1

      Oh wow good eye! Thanks for catching that. That's definitely a typo. The reason it still works and didn't throw an error is because that value is evaluated to a number, so [500] still works. Sharing a JS fiddle to demonstrate how num conversion happens - jsfiddle.net/n7wv0mLt/17/

    • @praveenscience
      @praveenscience 6 месяцев назад +1

      @@shrutikapoor08 Yep, I saw the article called how automatically the numerical values are converted silently by JS! 😅

  • @MetalKllaw
    @MetalKllaw 5 месяцев назад

    Interesting feature and very well explained! Thank you!
    One question, on the RenderName component, could i have used 'data' returned from the useFormStatus hook to get the name to display, instead of passing it directly as a prop?