Password generator created using react

Solution retrospective
What i learnt: it was a great opportunity to try and apply what i have learnt from udemy!
- working with input range and how to customise their styling: https://dev.to/christo_pr/create-a-nice-looking-input-range-with-only-css-4oa2 it was my first time being introduced to cross-browser compatibility and the existence of web-kit and etc
- every sibling item needs a key prop to help react identify what items changed
- for useEffect, only variables outside of the useEffect scope & within the component function need to be added as a dependency
- inputs should always have a corresponding label in order to improve accessibility.
What i think can be improved (currently attempting to do them in refactor branch):
- i am not very happy with the way i am handling the password regeneration when the button is clicked.
- so right now generateButton is working even though i am not passing anything into setReset. My guess is that even if i do not pass anything into setReset, the isReset state is somehow updated, causing the useEffect to run. is there any way i could perhaps refactor this?
- is there a better way to manage those useEffects?
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on choo liang yi's solution.
Join 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