P
Marc Francis
@marcfrancissAll solutions
- Submitted about 2 months ago
Space tourism multi-page website (React | Sass | Typescript | Vite)
- HTML
- CSS
- JS
- Submitted 3 months ago
Mortgage Repayment Calculator (ReactJS | Typescript | Vite | Sass)
- HTML
- CSS
- JS
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! 🍻