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
In React, the built-in <React.StrictMode> tag is a symbol. Trying to generate JSX for any tags with Symbol-names crashes at the following line because there's no handling for symbols:
Please add proper handling so Storybook works with inline StrictMode (since apparently it's broken otherwise).
Even something simple like the following would more than suffice:
// ... ^^ also make displayName not a constconst{
filterProps,
maxInlineAttributesLineLength,
showDefaultProps,
sortProps,
tabStop,}=options;/////////////////////if(typeofdisplayName==="symbol"){displayName=displayName===Symbol.for('react.strict_mode')
? "React.StrictMode" : String(displayName)}/////////////////////letout=`<${displayName}`;letoutInlineAttr=out;letoutMultilineAttr=out;letcontainsMultilineAttr=false;// ...
Sorry, I may eventually have time to make a PR, but if not, hopefully I've sufficiently identified the problem and the solution.
The text was updated successfully, but these errors were encountered:
In React, the built-in
<React.StrictMode>
tag is a symbol. Trying to generate JSX for any tags with Symbol-names crashes at the following line because there's no handling for symbols:https://github.com/algolia/react-element-to-jsx-string/blob/master/src/formatter/formatReactElementNode.js#L122
Please add proper handling so Storybook works with inline StrictMode (since apparently it's broken otherwise).
Even something simple like the following would more than suffice:
Sorry, I may eventually have time to make a PR, but if not, hopefully I've sufficiently identified the problem and the solution.
The text was updated successfully, but these errors were encountered: