Language
English
عربي
Tiếng Việt
русский
français
español
日本語
한글
Deutsch
हिन्दी
简体中文
繁體中文
Home
How To Use
Language
English
عربي
Tiếng Việt
русский
français
español
日本語
한글
Deutsch
हिन्दी
简体中文
繁體中文
Home
Detail
@cosdensolutions: How to properly reset forms in React #react #reactjs #reactjsdeveloper #programming #progammer #frontend #devtok #coding #code #codetok
Cosden Solutions
Open In TikTok:
Region: RO
Tuesday 16 May 2023 12:44:23 GMT
52001
2588
67
64
Music
Download
No Watermark .mp4 (
1.94MB
)
No Watermark(HD) .mp4 (
1.94MB
)
Watermark .mp4 (
2.11MB
)
Music .mp3
Comments
Calin Pastean :
great way to send another developer into a one hour debugging session
2023-05-16 18:20:22
40
Tyson :
That's not what keys are for. And suggesting a jr dev make use of this wonky hack instead of coding their own logic is disingenuous
2023-05-16 17:22:46
30
Simone Cervini :
A lot of experts in the comments should read “You Might Not Need an Effect” from the official react docs. THIS is actually the suggested method
2023-05-17 10:15:39
4
freyj1031 :
Why not just make a reducer and make a reset action?
2023-05-16 19:11:13
2
KT :
if you use a framework, most of the time Form components have a functional API to reset fields as well. READ DOCUMENTATION!
2023-05-25 12:53:59
2
Me :
this is not good approach because it make tje component hard not automous, and require the parent to know the internal logic of the child, bad.
2023-05-19 16:38:09
2
Night_Fury :
nice. great way to make use of key prop.
2023-05-16 16:20:00
2
Tj :
An even better approach is to use libraries like react router or react query to handle form/state updates based on query param values like id
2023-05-17 21:55:21
2
Tone | Software Engineer :
There’s a better way to implement resetting the form via redux
2023-05-16 22:06:29
2
Kabbe :
I dont understand. This is based on "for getting" to set a local state. Thats not a bug imo.
2023-05-16 23:22:58
1
user30594885974435 :
Why some one will do this? After submitting the form and success from server just reset
2023-05-16 20:25:59
1
user30594885974435 :
Dude in the first comment I didn’t understand how will use useEffect like that, but now hooo you are showing something is bad in so many ways, I don’t
2023-05-16 20:31:01
1
user30594885974435 :
To be the bad dude, I’m just going to say you are a unique programmer I’ll never what to work with someone do things like this, you cause react to
2023-05-16 20:32:53
1
Alex Condurachi :
But the profile form should make an Ajax call for profile info tho, display the data and provide edit funcl, taking user id as pr makes no sense realy
2023-05-16 19:11:01
1
BeMax123🇽🇰🇦🇱 :
👍
2023-05-16 13:21:13
1
jorge :
use react form
2023-05-17 01:55:35
1
Reuel :
You learn something everyday
2023-05-17 07:32:03
1
F. :
or just add setFirstName("") at the end of submit function
2023-05-17 08:49:02
1
Ionut Sandu :
This feels like a hack. I would still do it the right way to make sure the person that's reading the code understands it.
2023-05-17 08:54:35
1
JaviTheOwl :
Theme? 👀
2023-05-16 16:29:46
1
Fernando :
Is this even needed in the first place? if you correctly summited the form, you redirect the user to another page and that will destroy the component.
2023-05-17 11:47:13
1
Andy :
How to pass value from child component to parent
2023-05-17 15:03:07
1
Col Store :
New key->new compnent. Got it🥰🥰
2023-05-16 16:23:58
1
Random Atom :
Doing this for 5 years ( before useEffect) people complaining about this? Hmm
2023-05-17 23:53:58
1
Than Htut Zaw :
I can see clearly with example but I still can't use in my real project
2023-05-18 04:15:38
1
To see more videos from user @cosdensolutions, please go to the Tikwm homepage.
Other Videos
😂😂 @kentizol #alwaysandforever #400k #curvy #mumoftwo #husbandwife #marieh_254 #mum
HAULLL!!! (As u can see I need a break from the mall) 🛍️
#persona5 #joker #futuba
Trying CapCut templates on my setup#fyp #jespertech #techtok #capcuttemplate #edit #triplemonitorsetup #triplemonitors #gaming #pc #setup
La meuf contradictoire 😭 bous aussi vous etes comme ca?!🥲 #viral
Já sabiam desses truques? Eu amo MT cada um deles 🥹🤍
About
Robot
Legal
Privacy Policy