americanexpress / react-albus

✨ React component library for building declarative multi-step flows.
Apache License 2.0
1.1k stars 89 forks source link

how to set wizard step #108

Closed jessemlay closed 3 years ago

jessemlay commented 3 years ago

I cannot for the life of me understand how I need to reset the wizard when my modal closes.

Is there a way I can call the set method from a functional component ?

This doesn't work. function reset() { <WithWizard render={({ set, step }) => { console.log(step); set('chart selection'); }} />; }

jessemlay commented 3 years ago

figured it out: render={({ next, previous, push }) => (