jcmcneal/react-step-wizard

Pass data when step changes

robvenn opened this issue · 2 comments

Maybe I''m missing something but I guess this is a feature request, would it be possible to pass data to the onStepChange handler?
Especially when going to the next step this would really help for a lot of functionalities that can be built with this I think, like one example where user has to enter data on some of the steps and the parent component can use this to update state, or do you have better suggestions?
This could also maybe change the steps as you are going through it depending on which data is entered.

I believe what you are asking is supported.
See the example code, https://github.com/jcmcneal/react-step-wizard/tree/master/app

You can keep data in the parent state and pass it as props to other steps if thats what you are asking?

@Pautomagi alright thanks for the info!
Just fyi the npm scripts don't seem to work on Windows, but looking at the example code in the app.js did give me some examples to work around this... So I will close the ticket.