Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 7 months ago

React jsx scss useState for real-time form validation with blur/change

react, sass/scss, vite, react-hook-form
Renee Cheng•20
@reneecwl
A solution to the Mortgage repayment calculator challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I am most proud of the layout and design, which closely matches the mockup, including all the error and hover states. I also used conditional rendering effectively to display the appropriate results. For the error message, I make use of useState to do real-time validation. However, looking back, I realize I should have planned the structure of the elements and components earlier in the project to ensure smoother implementation.

What challenges did you encounter, and how did you overcome them?

While there wasn’t anything that completely halted my progress for days, I did find the mortgage formula calculation a bit tricky at first. With some research and troubleshooting, I was able to work through it and resolve the issue.

What specific areas of your project would you like help with?

One area where I could use help is in determining the exact colors, as some weren’t specified in the design. To address this, I inspected the live version of the project and extracted the color codes from there.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Renee Cheng'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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License