I am new to React and i am playing around with ant design. I need to build a multi-step form where each step has a couple of fields and the final step will have a submit button. This would use useForm hook from antd. I would prefer not to use any other plugins like antd-form-builder etc.
The issue i am facing is that in the multi-step form, at the last step, when i press submit the form data for last step is available and data for previous steps is not available. I reckon this could be because the step is being replaced in DOM when i move to "next" step.
Is there any simpler way to obtain the data from all forms at the last step ?
I have prepared a codesandbox for the sample.. Refer the console after submitting.
https://codesandbox.io/s/cool-mcnulty-or8jw
Thanks for the help!