You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's difficult to articulate the problem, as it involves a mix of things to manifest itself, which is slowness of loading a story (long seconds), or a complete browser hang, where the tab must be forced to a close.
EVIDENCE.mp4
For some reason, this only happens for stories which are wrapped with:
And only with lots of JSX in some props property which is spread on the story's component:
storiesOf('issue',module).add('Render slow',storyWrap(()=>{constprops={data: [...Array(100)].fill(<></>)// filling an array with JSX syntax manifests the problem}return<Foo{...props}>slow</Foo>}))
I've narrowed it down to @storybook/addon-essentials, which is a common addon collection, and within it
to the docs & controls addons. When both are disabled, this issue does not occur:
main.js
module.exports={"stories": ["../stories/**/*.stories.mdx","../stories/**/*.stories.@(js|jsx|ts|tsx)"],"addons": ["@storybook/addon-links","@storybook/addon-interactions",{name: '@storybook/addon-essentials',options: {docs: true,// set to false to eliminate the issuecontrols: true,// set to false to eliminate the issueactions: true,backgrounds: true,viewport: true,}}],"framework": "@storybook/react"}
Additional context
Updated Storybook (and some other packages) for a large components repo (of my workplace),
and then I saw some stories caused the browser to hang completely. Took ~10 hours to narrow it down.
We have hundreds of stories wrapped with this (storyWrap) wrapper, so it's not that simple to make
an overall change, and also, it is very strange those mentioned addons are involved in the slowness.
The text was updated successfully, but these errors were encountered:
I have a similar issue where if i pass a ReactNode inside a object as a prop to a component that's being rendered , the story takes a while to render. (ex: <Label test={{ test: <div>Hello</div> }} /> the prop doesn't need to be used), i am also using the docs and controls addon but disabling them, doesn't seem to help
Describe the bug
It's difficult to articulate the problem, as it involves a mix of things to manifest itself, which is slowness of loading a story (long seconds), or a complete browser hang, where the tab must be forced to a close.
EVIDENCE.mp4
For some reason, this only happens for stories which are wrapped with:
And only with lots of JSX in some props property which is spread on the story's component:
I've narrowed it down to
@storybook/addon-essentials
, which is a common addon collection, and within itto the
docs
&controls
addons. When both are disabled, this issue does not occur:main.js
To Reproduce
👉 Please clone my (very simplified) repo
System
Additional context
Updated Storybook (and some other packages) for a large components repo (of my workplace),
and then I saw some stories caused the browser to hang completely. Took ~10 hours to narrow it down.
We have hundreds of stories wrapped with this (
storyWrap
) wrapper, so it's not that simple to makean overall change, and also, it is very strange those mentioned addons are involved in the slowness.
The text was updated successfully, but these errors were encountered: