Design comparison
Solution retrospective
This is my first React.js Challenge submission I would love to have feedback on code optimization, to improve in my future challenges.
Thank You😊
Community feedback
- @visualdennissPosted over 1 year ago
Hey there,
great work completing the challenge successfully! However it looks like the states are not preserved when switching between steps as they get resetted each component is re-rendered from scratch therefore losing their state. You could lift the states up to their common shared parent and let the child components manipulate the state, but this might end up in prop drilling. I'd suggest using a state management like Redux or a built-in useContext / Context API.
Hope you find this feedback helpful!
1@srujan-landeriPosted over 1 year ago@visualdenniss Yes the input state is not preserved, I will look at contextAPI and improve from next challenges. Thank you!☺️
0@visualdennissPosted over 1 year ago@srujan-landeri You are welcome! Happy to be helpful :)
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