Open dkhierl-chacrasoftware opened 9 months ago
@dkhierl-chacrasoftware Thanks David. It took me sometime to figure out the React context to use it instead of the custom hook. But I have managed to implement it. Please review it when possible and let me know you thoughts.
Hi @jedinrk , Looks good! just make sure to fix typescript error. seems like you forgot to export some interface or types.
Thanks. Fixed it! @dkhierl-chacrasoftware
looks good!
@jedinrk sorry need to reopen, the form is not properly working
@dkhierl-chacrasoftware My bad! I had a last minute UI improvement done, which led to a missing phone number validation logic. I have fixed and pushed it.
custom hook
useMultiStepForm
is a good idea but it implements anti pattern by passing an array of element to its argument and returning back an element. One better way to make this more maintainable is by using acontext
. here is an example of the composition.