-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Empty lines in Playground fail to build in v2 #1099
Comments
I have the same problem |
Hey! Thanks for reporting, this looks like a gatsby-plugin-mdx issue. You can track the issue I opened on the gatsby repo about it here : gatsbyjs/gatsby#17947 |
I have the same problem |
Actually it is I guess it is not popular approach to write hooks in playground ¯_(ツ)_/¯, but this bug is main reason why I can't update from 0.13 -> 2.x :( |
Yep @exah it looks like it's a mdx issue. But the issue doesn't affect your ability to use hooks with docz 2. You just need to remove the extra empty line and it will work as expected (while waiting for the issue to be resolved). Example : <Playground>
{() => {
const [ count, setCount ] = React.useState(0);
return (
<div onClick={() => setCount(count + 1)}>
<div>Some message {count}</div>
</div>
)
}}
</Playground> |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Bug Report
Describe the bug
Empty lines in a React component defined in
<Playground>
fails to build.To Reproduce
A slightly modified version of the basic example repo with the bug can be found here: https://github.com/TWaltze/docz-empty-line-bug
The core issues comes down to:
This results in the error:
Expected behavior
I'd expect empty lines to be allowed and for the build to succeed.
Environment
Additional context/Screenshots
I believe this is similar to #1003
The text was updated successfully, but these errors were encountered: