DEV Community

Discussion on: Multi-step forms with React & TypeScript

Collapse
 
prem1835 profile image
prem1835

I'm making a 2 step form using this library and I'm having confusion in gathering state in one place and sending form data to backend

Collapse
 
prem1835 profile image
prem1835

Can you quickly explain to me how can I do that please

Collapse
 
sametweb profile image
Samet Mutevelli

Sure. Make sure your form elements have props.handleChange passed as a callback function. The state will be available in the props.state object once the user inputs data in the form elements. Let me know if you still have trouble, I can create an example for you on codesandbox.

Thread Thread
 
prem1835 profile image
prem1835

I have mailed you on sametmutevellioglu@gmail.com