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.
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.
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.
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.
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.
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
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?
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
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 😅
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 😅🎉
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?
@@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!
"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.
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
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🙏
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
Thanks
Thank you for the support!
Keeping up with new technology, learning and teaching it to people at that instance is such an underrated skill
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.
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.
I have learned so much from you, thankyou! Please stay awesome 🎉
What a great explanation kyle, what a simple explanation man, as always a great teacher with great teaching style
Your content is terrific.
🤡
I just saw the documentation for this hook today and you brought up a video about it what a coincidence
you are doing great job man
If don't know? Google, "can't please everyone donkey story" classic lol please don't change, keep up the good work.
its very nice hook😍
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.
Wow this hook is really useful! Thank you for sharing Kyle
Web Dev GOAT
Most ppl don’t want to spend the time to do this upfront , but a stitch in time saves 9!
I have a question, can we manage state of multiple inputs in one useRef ??
seems to be an Angular way of doing things with forms :D
Just use Remix?
or react router
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.
You never showed how to use it with server components as promised.
Great hook by the way!
useActionState🔥🔥🔥
Can you please make a video on handling all types of error while installing npm packages , installing node modules with package.json . 😃
Can you please make video on "Working with Reactjs and Django REST Framwork"
Nope, you suck so better change industry
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.
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
Can we use this hook in tandem with react hook form or any other form state management library?
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.
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
@@griffadev Agreed.
What about client side validations?
doesn't the saverUser component become a client component because it's imported into one?
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?
I use an express backend and use nextjs as the frontend 😂😂 I don't care whether it sucks or not
literally all you have to do is use next/dynamic and disable ssr.
Sir please bring some projects videos on next js
could you create a setup tour or room tour video please ?
Do you guys think this hook can be used with form state management like formik?
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
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 😅
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 😅🎉
If anybody has seen an ad in your video, it would benefit you, right? I mean 💰🤑💵💸
How do you install this?
is this for react v 19?
1:37
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?
How to simplify react:
1) Stop using react to save performance & headache
ngl i gave up on react lol, i like it but i cant keep up with the variance, but i still watch the videos
less code but more complex than the messy code... especialy the gotchas around the third parameter!
Skill issue
@@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!
@@hardcorecode what hidden pitfalls are you talking about?
@@hardcorecode 🤡you learned just useState and now your brain cannot compute other simple hook or what? Nothing is hidden
@@AvikNayak_ The thrid parameter of useActionState.
But with nextJs - NextSafeAction seems better than the original.
Came for the code, subscribed 'cuz you're hot 😂
the head wobbling goes head
"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.
Still not good enough as react-hook-form :)
This hook will probably be more handy in the future ;)
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
@hamedbahram has a very good video on the topic
FYI, react-hook-form violate rules of react several times over, by design. It's just, currently, there are no better alternatives.
you probably dont need that ref
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🙏
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..
Miss when this channel wasn't just about React.
mfw one more web dev technology used by millions
But it's not? Look at the other videos idiot
Yours videos are very good we all like that but stop shaking you head when you talk lol not good to see
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
bro is punching the air rn