Multi Step form with TypeScript and more...

Solution retrospective
At first, I thought it would be easy to complete, but when I started coding I realized the importance of the little details. To validate the fields of the personal information form I used react-hook-form, this is a tool that I've recently started to use and I thought it was a great opportunity to implement it, However I later realized it might not be the best option because this is the only form and component where I can use it. Although it makes input validation easier I will start working on a solution without this tool.
What challenges did you encounter, and how did you overcome them?The most challenging part was setting up the context for the global state, especially the function that updates the selection of add-ons. Initially, it was poorly written because it only accepted a value with a defined type and did not consider that it could also be updated with information from the previous state. It took hours of research, trial, and error, but in the end, I managed to find a solution.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @javierdesant
Hey @DanVillanueva30, ¡buen trabajo!
Me gusta lo que has hecho, implementando react router y useContext. Eso sí, ten cuidado con tu barra lateral, si no validas los pasos antes de redirigir al usuario te pueden enviar un formulario vacío...
Por lo demás está bastante bien, Sigue así 👍
Marked as helpful
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