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
Hello, today I faced an issue while defining Stories that are meant to pass JSX to my component, rather than mere strings. Under these circumstances, Storybook generates an error Cannot assign to read only property '$$typeof' of object '#<Object>'. This problem persists regardless of how the prop specified in args is managed within the component. Although passing props as strings or numbers functions correctly, attempting to pass JSX does not succeed.
Full reproduction repo is here: https://github.com/a-bugaj/storybook-8-bug-reproduction
exportconstLabelStory3: Story={name: "label (non-working component)",args: {label: 'Hi, this component should fully works...',randomUnhandledPropInComponent: <span>...but trying to pass JSX prop causes it to crash:/</span>},};
TypeError: Cannot assign to read only property '$$typeof' of object '#<Object>'
at traverseArgs (preview.js:208:1266)
at traverseArgs (preview.js:208:1268)
at wrapActionsInSpyFns (preview.js:208:1357)
at runtime.js:100:7419
at Array.reduce (<anonymous>)
at preparePartialAnnotations (runtime.js:100:7360)
at prepareStory (runtime.js:100:4106)
at StoryStore.memoizerific [as prepareStoryWithCache] (runtime.js:1:4751)
at StoryStore.storyFromCSFFile (runtime.js:106:9309)
at CsfDocsRender.prepare (runtime.js:121:1031)
Describe the bug
Hello, today I faced an issue while defining Stories that are meant to pass JSX to my component, rather than mere strings. Under these circumstances, Storybook generates an error
Cannot assign to read only property '$$typeof' of object '#<Object>'
. This problem persists regardless of how the prop specified in args is managed within the component. Although passing props as strings or numbers functions correctly, attempting to pass JSX does not succeed.Full reproduction repo is here:
https://github.com/a-bugaj/storybook-8-bug-reproduction
An example of a simple component:
Meta:
Working stories: ✅
Non-working stories: ❌
Also non-working stories: ❌
To Reproduce
https://github.com/a-bugaj/storybook-8-bug-reproduction
System
Additional context
No response
The text was updated successfully, but these errors were encountered: