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

React: Fix decorators to conditionally render children #22336

Merged
merged 7 commits into from
Jun 7, 2023

Commits on Jun 1, 2023

  1. React decorators can conditionally render children

    Fixes storybookjs#15223
    Custom preview-api hooks assumed that all decorators were always rendered
    however if a custom decorator conditionally rendered it's children, then
    not all decorators would get rendered, especially jsxDecorator.
    This would result in the error
    "Rendered more hooks than during the previous render."
    This removes the assumption that all decorators render every time
    and relies on each decorator to register itself during MOUNT phase
    which is handled when each decorator goes through `hookify`
    redbugz authored and tmeasday committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    9068e31 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6822e4d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cfeae71 View commit details
    Browse the repository at this point in the history
  4. Tweak story again

    tmeasday committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    213117b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8345c78 View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2023

  1. Configuration menu
    Copy the full SHA
    01ab450 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2023

  1. Configuration menu
    Copy the full SHA
    85f723b View commit details
    Browse the repository at this point in the history