Design comparison
Solution retrospective
Hi everyone this is my first react app, Any feedback or best practices very welcomed.
Community feedback
- @MaxTarasevichPosted about 2 years ago
Hi Suleman!
You are done a great work!
But I think your application needs some optimization!
In your App component you have 9 states!I think it a lot for small app like this!
It is very easy to get confused and lose data among so many states, try to minimize it, for example, the state can be represented as an object!
Optimization will help you find the reason why the reset button does not reset the state to default values as expected.
I hope my feedback helps you!
Write if you again come to a standstill, I will try to help in more detail!
Marked as helpful1@legion40216Posted about 2 years ago@MaxTarasevich Thank you bro, I did manage to solve the issue by understanding react controlled components. Essentially i had to use a
callback
to check whichradio button
has been pressed and change the react State accordingly.0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord