We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
JSX references to Javascript variables with {} do not work as children of a component or tag when on a line with other plain text.
Rendering this example:
export const name = "world"; export const color = "red"; Hello <span style={{color: color}}>{name}</span> <span style={{color: color}}>Hello {name}</span>
Will produce:
Hello {name} Hello world
However referencing the color variable does work to change the text color on both lines.
I would expect both lines to render "Hello world".
The variable reference is rendered as text instead.
The text was updated successfully, but these errors were encountered:
Correct, those aren’t working. It’s being discussed here: #994
Sorry, something went wrong.
#994 is a self-reference. The related issue is probably #556.
No branches or pull requests
Subject of the issue
JSX references to Javascript variables with {} do not work as children of a component or tag when on a line with other plain text.
Your environment
"@mdx-js/parcel-plugin-mdx": "1.5.8",
"@mdx-js/react": "1.5.8",
Steps to reproduce
Rendering this example:
Will produce:
However referencing the color variable does work to change the text color on both lines.
Expected behaviour
I would expect both lines to render "Hello world".
Actual behaviour
The variable reference is rendered as text instead.
The text was updated successfully, but these errors were encountered: