Submitted 3 months ago
Mortgage Repayment Calculator (ReactJS | Typescript | Vite | Sass)
@marcfranciss
Design comparison
SolutionDesign
Solution retrospective
What are you most proud of, and what would you do differently next time?
Built with
-
Semantic HTML5 markup
-
Flexbox
-
React - JS library
-
npm create vite@latest
-
Sass - For styles
npm install -g sass
The challenge šŖ
Users should be able to:
- Input mortgage information and see monthly repayment and total repayment amounts after submitting the form ā
- See form validation messages if any field is incomplete ā
- Complete the form only using their keyboard ā
- View the optimal layout for the interface depending on their device's screen size ā
- See hover and focus states for all interactive elements on the page ā
Live Site URL: Solution
What specific areas of your project would you like help with?Still unsure if this is the proper way to do reset the form. Any advice will be greatly appreciated.
useEffect(() => { if (onReset) { // resets the data to blank setMortgageData({ amount: "", year: "", interest: "", type: "", mMonthly: "", mInterestOnly: "", mTotal: "", }); // resets the errors to false, so it will not show setErrors({ amount: false, year: false, interest: false, type: false, }); // returns reset button to default state setReset(false); } }, [onReset]);
Thank you for taking the time in checking this project. š
I hope this somehow help you in what you're looking for. Cheers! š»
Community feedback
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