Multi-step form: React | TypeScript | SCSS

Solution retrospective
Hello, Frontend Mentor community 👋
This time, I've completed a multi-step form project. I thought it was a great opportunity to use React Router, and I also added some simple tests using the React Testing Library. I expanded the project with TypeScript.
As always, I kindly request your feedback and wish you a great week 🚀
Thank you! 😊
Please log in to post a comment
Log in with GitHubCommunity feedback
- @mukwende2000
Hello, this is my honest feedback, first react router was not needed for this project as the different part of the form are not routes, by splitting the form part into routes, you have just made each part a different no wonder you have form on every route. This is one form and when submitted should submit all the data as one group of data from one form, but as it is, the way you have structured this mean each part is its own form.
Marked as helpful - @aryanda1
I noticed two problems while testing your website.
- when i enter some valid in name and email, and a invalid number, and click on next step, the website refresh and erases all inputs.
- if i selected some addon, and after changing plan, the addon gets removed.
- @mukwende2000
Having something like this
<form> some inputs </form> <form> some other inputs </form>
Makes this two forms regardless of any state, and each form has it own onSubmit event, forms have everything to do with html and nothing to do with react, so you should never compromise html structure because of any framework. As for routing, it is for navigating between pages and not for dividing forms. That was what i meant. Happy Coding.... Have an amazing day.
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