Hello Developers π,
Itβs me your friend Md Taqui Imam, and today Iβm going to explain a new and exciting hook in React called useActionState.
Fo...
For further actions, you may consider blocking this person and/or reporting abuse
It is definitely nice to use server actions and useActionState, but I still like more control over validation and still prefer Formik + Yup combo. To be honest, the end user doesn't care at the end and cannot tell the difference π¨πΌβπ»
Thanks for you suggestions π«‘
What's the difference between useactionstate and use effect
Both useActionState and useEffect are hooks in React, but they serve different purposes and are used in different scenarios
Just like salt and mackerel. They both are edible "things" used in different scenarios π
What I really meant is...
that we should get back the "get a life" trend but with people that use AI for everything while trying to hide it. Stop it. It's sad. If that wasn't enough its even more easy to spot AI generated text than it is to spot SEO directed content written by humans.
ππ too good
useActionState : For Form Mutations.
useEffect : lifecycle hook to control components state
π
So React keeps on piling up things on top of things. Poor React devs, having to keep up with this hot mess.
π π
I cant get the message from useActionState to return the server action value, see example
server file :
client file :
Interesting topic! Everything is explained articulately and clearly. For your project, consider checking out this free npm package: select-paginated.
Great article Taqui. I enjoyed learning from it
Thanks Lucian π
nice share πππ»
Happy to hear that you liked it π
π
Thanks for Sharing
Happy to hear you liked it π₯°
what is the major difference between this and useTransition????
Funny how everything is trying to catch up to Remix.run / React Router 7.
This is old news π