We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to pass additional props to each steps aside the initial props i.e. previousStep, nextStep e.t.c
The text was updated successfully, but these errors were encountered:
I hope this helps you. This is how I implemented where I am working.
const components: any = [ { name: "component-1", component: Component1 }, { name: "component-2", component: Component2 }, { name: "component-3", component: Component3 }, ];
const steps = components.map((component: object, index: number) => { return { ...component, props: { something: ":D" }, }; });
const handleRender = () => { const arrOfComponents = steps.map((step) => createElement(step.component, step?.props) ); const arrOfChildren = Children.toArray(arrOfComponents); return Children.map(arrOfChildren, (child, index) => cloneElement(child as any) ); };
<StepWizard> {handleRender()} </StepWizard>
Sorry, something went wrong.
No branches or pull requests
Is there a way to pass additional props to each steps aside the initial props i.e. previousStep, nextStep e.t.c
The text was updated successfully, but these errors were encountered: