Skip to content
New issue

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

Loop through steps and render them? #86

Open
sebastianbilling opened this issue Nov 16, 2020 · 3 comments
Open

Loop through steps and render them? #86

sebastianbilling opened this issue Nov 16, 2020 · 3 comments

Comments

@sebastianbilling
Copy link

Hi!

I'm trying to loop through a bunch of steps and render them, but they are never rendered.

`<Route render={({ history }) => (

          <Wizard history={history}>
            <Steps>
              {steps.map((stepdata, index) => {
                return (
                  <Step key={index} id={`step${index}`}>
                    <CustomStep
                      key={index}
                      data={stepdata}
                    />
                  </Step>
                )
              })}
            </Steps>
          </Wizard>
        )}
      />

`

If I try to render a single component like in the examples it works perfectly.

Is it a problem looping through steps? Or is React Albus not too happy with a single component being rendered multiple times with different data?

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity.

@ryhinchey
Copy link
Contributor

I believe the issue is that stepData in your example is initially an empty array and albus does not re-render. This will be fixed in v3

@github-actions
Copy link

github-actions bot commented Aug 5, 2023

This issue is stale because it has been open 30 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants