devrnt / react-use-wizard

🧙 A React wizard (stepper) builder without the hassle, powered by hooks.

Home Page:https://devrnt.github.io/react-use-wizard/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Steps are all rendered together when children of wizard is a fragment

mayakoneval opened this issue · comments

Hello! I noticed when children wrapped in a fragment are passed to Wizard, the wizard is rendered three times one after another.

Curious if there is a reason this is not supported or if it should be, thanks!

  <Wizard>
    <>
      <Step1 />
      <Step2 />
      <Step3 />
    </>
  </Wizard>

Hi, this leads to expected behaviour as mentioned in the README:

<Wizard/> is used to wrap your steps. Each child component will be treated as an individual step. You can pass a shared footer and header component that should always be in your steps

Hope that answers your question

Feel free to re-open if you have any more questions