Learn useActionState In 8 Minutes - React Hooks Simplified

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

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

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

    Thanks

  • @EmmanuelOfoneta
    @EmmanuelOfoneta 4 месяца назад +3

    Keeping up with new technology, learning and teaching it to people at that instance is such an underrated skill

  • @yonnierenton6177
    @yonnierenton6177 4 месяца назад

    I have learned so much from you, thankyou! Please stay awesome 🎉

  • @SakibHassan-W-D
    @SakibHassan-W-D 3 месяца назад

    What a great explanation kyle, what a simple explanation man, as always a great teacher with great teaching style

  • @daleryanaldover6545
    @daleryanaldover6545 4 месяца назад +5

    The third parameter of useActionState is for progressive enhancement, it takes the url passed in and you can send the form without any javascript. It has niche use case but if you aim for your app to be accessible it is the way to go.

  • @jasonleelawlight
    @jasonleelawlight 20 дней назад

    Thank you again! This really simplified my React 19 learning journey. Personally I'm not a fan of these newly added hooks, they make things a lot more convoluted compared with the older hooks.

  • @itsMohak
    @itsMohak 4 месяца назад +6

    Your content is terrific.

  • @fakedevdutt
    @fakedevdutt 4 месяца назад

    I just saw the documentation for this hook today and you brought up a video about it what a coincidence

  • @technodeeps
    @technodeeps 4 месяца назад +6

    you are doing great job man

  • @alirezanouri9849
    @alirezanouri9849 Месяц назад

    its very nice hook😍

  • @thecodelogin
    @thecodelogin 3 месяца назад

    That is absolutely informative alot. sometime you have to make you speed slow for newest topics. 😁 Because youtube has the feature to increse video speed. so we will increase speed whenever required.

  • @deepjasoliya9137
    @deepjasoliya9137 4 месяца назад +2

    I have a question, can we manage state of multiple inputs in one useRef ??

  • @yonnierenton6177
    @yonnierenton6177 4 месяца назад

    If don't know? Google, "can't please everyone donkey story" classic lol please don't change, keep up the good work.

  • @Alessandro-nq3tm
    @Alessandro-nq3tm 4 месяца назад +4

    Wow this hook is really useful! Thank you for sharing Kyle

  • @Dostendite
    @Dostendite 4 месяца назад

    Web Dev GOAT

  • @JokeryEU
    @JokeryEU 4 месяца назад

    seems to be an Angular way of doing things with forms :D

  • @LekkyDev
    @LekkyDev Месяц назад

    You never showed how to use it with server components as promised.
    Great hook by the way!

  • @clevermissfox
    @clevermissfox 2 месяца назад

    Most ppl don’t want to spend the time to do this upfront , but a stitch in time saves 9!

  • @amirmohammadsanji
    @amirmohammadsanji 4 месяца назад

    useActionState🔥🔥🔥

  • @goblinslayr
    @goblinslayr 2 месяца назад

    doesn't the saverUser component become a client component because it's imported into one?

  • @salmonsadik5809
    @salmonsadik5809 4 месяца назад

    Can you please make a video on handling all types of error while installing npm packages , installing node modules with package.json . 😃

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

    Just use Remix?
    or react router

    • @TannerBarcelos
      @TannerBarcelos 4 месяца назад

      Agreed, but I think the purpose of the video was to show React offers these things now right out of the box now. I'd still reach for (react/tanstack)-router, though.

  • @fadfooood
    @fadfooood 4 месяца назад

    What about client side validations?

  • @dipaksaha6629
    @dipaksaha6629 4 месяца назад

    Sir please bring some projects videos on next js

  • @amirmohammadsanji
    @amirmohammadsanji 4 месяца назад

    could you create a setup tour or room tour video please ?

  • @omedakram8970
    @omedakram8970 4 месяца назад

    How to send image from server action to another backend endpoint..?! I try bunch of example and resources, nothing answer me, in my error say only plain object can send to server data

  • @NikhilPanchal-oc5mr
    @NikhilPanchal-oc5mr 4 месяца назад +1

    Can you please make video on "Working with Reactjs and Django REST Framwork"

    • @aleksander5298
      @aleksander5298 4 месяца назад

      Nope, you suck so better change industry

  • @ssk7690
    @ssk7690 4 месяца назад

    I use yup for form handling and react query for fetching, and I have some questions. How do we prefill a form (in case it is an update form). In yup we have setValue which does that.

    • @mootazbellehweslati5603
      @mootazbellehweslati5603 4 месяца назад

      If u r using react hook form u can use the reset function after fetching the data the perform the update when the user interact with the form

  • @GoldenMechaTiger
    @GoldenMechaTiger 4 месяца назад

    How do you install this?

  • @Wakkyguy
    @Wakkyguy 4 месяца назад

    Can we use this hook in tandem with react hook form or any other form state management library?

    • @marwen_dev
      @marwen_dev 4 месяца назад

      actually with this hook you will no longer need react-hook-form. just use it with zod and server action, it is way cleaner and simpler to maintain.

    • @griffadev
      @griffadev 4 месяца назад +2

      I don't think that's true aside from very basic cases. react hook form does a lot more, such as auto focusing inputs when there are validation errors,. managing arrays of fields such as reordering deleting and adding and much much more. This hooks does very little/almost none of what react hook form gives you

    • @Wakkyguy
      @Wakkyguy 4 месяца назад

      @@griffadev Agreed.

  • @MrWolfSRB
    @MrWolfSRB 4 месяца назад

    Hey, could you make a video about setting up React project that is fully client side? I like structure of NextJS (file based router), but hate the server side of it... I still like to keep things separated, backend and frontend as separated projects... I know NextJS is good for SEO, but for projects like admin dashboards, I would like to use a fully client side React with file based router and code splitting out of box... Is there such a framework, and if not, could you make a video how to set everything up?

    • @luciusjackson3399
      @luciusjackson3399 4 месяца назад

      I use an express backend and use nextjs as the frontend 😂😂 I don't care whether it sucks or not

    • @PraiseYeezus
      @PraiseYeezus 4 месяца назад

      literally all you have to do is use next/dynamic and disable ssr.

  • @magnuserikkeenrobot1117
    @magnuserikkeenrobot1117 4 месяца назад

    is this for react v 19?

  • @bariqdharmawan6604
    @bariqdharmawan6604 4 месяца назад

    Do you guys think this hook can be used with form state management like formik?

  • @omega.developer
    @omega.developer 4 месяца назад +4

    When it compares to the most used react-hook-form, i think this hook will be the most handful and make sense in upcoming improvements and no need of external dependency. Yeah, its correct that the react package size would increase eventually as well 😅

    • @omega.developer
      @omega.developer 4 месяца назад

      Hi kail, I've seen an ad during this video. So, from next time onwards please mention the first Ad seen guy who commented first in the video. Create a video on the weekend and get more subscribers 😅🎉

    • @omega.developer
      @omega.developer 4 месяца назад

      If anybody has seen an ad in your video, it would benefit you, right? I mean 💰🤑💵💸

  • @marcospacaco
    @marcospacaco 4 месяца назад

    Paguei passagem aérea para ir do Rio para SP Capial. Paguei hospedagem e encarei 7h de ônibus para voltar pra casa, vou exigir naa justiça o pagamento de tudo que gastei, ppis não aceito e tenho para repetir. Porque não anula apenas a da sala com problemas?

  • @fbiindia9661
    @fbiindia9661 4 месяца назад +2

    ngl i gave up on react lol, i like it but i cant keep up with the variance, but i still watch the videos

  • @hardcorecode
    @hardcorecode 4 месяца назад

    less code but more complex than the messy code... especialy the gotchas around the third parameter!

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

      Skill issue

    • @hardcorecode
      @hardcorecode 4 месяца назад

      ​@@aleksander5298 ​ skill issue for which code? I am just pointing out that messy code worked just fine and straightforward to understand whilst the useActionState Hook introduces "hiddens" pitfals!

    • @AvikNayak_
      @AvikNayak_ 4 месяца назад

      @@hardcorecode what hidden pitfalls are you talking about?

    • @aleksander5298
      @aleksander5298 4 месяца назад

      @@hardcorecode 🤡you learned just useState and now your brain cannot compute other simple hook or what? Nothing is hidden

    • @hardcorecode
      @hardcorecode 4 месяца назад

      @@AvikNayak_ The thrid parameter of useActionState.

  • @ShadowsPowerFy
    @ShadowsPowerFy 4 месяца назад

    But with nextJs - NextSafeAction seems better than the original.

  • @TomerBrosh
    @TomerBrosh 3 месяца назад

    Came for the code, subscribed 'cuz you're hot 😂

  • @usethisforproductivity-tg7xq
    @usethisforproductivity-tg7xq 3 месяца назад

    the head wobbling goes head

  • @b4rt1j1
    @b4rt1j1 24 дня назад

    How to simplify react:
    1) Stop using react to save performance & headache

  • @josevsebastian2909
    @josevsebastian2909 4 месяца назад

    "slow enough that javascript is not downloaded yet"? You're joking, right? Or do you not know the actual reason??? That parameter is for progressive enhancement, such that the page can function without javascript, you know, if you have disabled js for e.g. security reasons.

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

    Still not good enough as react-hook-form :)

    • @omega.developer
      @omega.developer 4 месяца назад +1

      This hook will probably be more handy in the future ;)

    • @friedricht3908
      @friedricht3908 4 месяца назад

      Actually you can use a server action with react hook form. You just subscribe the form to react hook form and after every client validation, you call the server action. But to do that, you need to drop the action attribute. And call the server action in the function which you call handle submit on

    • @friedricht3908
      @friedricht3908 4 месяца назад

      @hamedbahram has a very good video on the topic

    • @josevsebastian2909
      @josevsebastian2909 4 месяца назад

      FYI, react-hook-form violate rules of react several times over, by design. It's just, currently, there are no better alternatives.

  • @cloudsss83
    @cloudsss83 4 месяца назад

    you probably dont need that ref

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

    thank you, great tutorials, one question though, I get irritated from all the wiggling of your head when you talk... are you aware that you are doing this? no offense, if that's a part of you that you don't want or can change, I appreciate your work either way🙏

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

      damn, I can't unsee it now. I noticed his past old videos, his head is just steady, perhaps now it's getting worse, i dont know..

  • @ymh_7885
    @ymh_7885 4 месяца назад

    Yours videos are very good we all like that but stop shaking you head when you talk lol not good to see

  • @SidaliTv-h8i
    @SidaliTv-h8i 4 месяца назад +1

    I like your videos, and I have a motion sickness, please, try not to move so much, or hide the face. I watch on TV, so I can't hide the face with another window like I do on pc

    • @apidas
      @apidas 4 месяца назад

      bro is punching the air rn

  • @7heMech
    @7heMech 4 месяца назад +9

    Miss when this channel wasn't just about React.

    • @әкрәм
      @әкрәм 4 месяца назад +8

      mfw one more web dev technology used by millions

    • @gttmone
      @gttmone 4 месяца назад

      But it's not? Look at the other videos idiot