We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
In v12,
module MyWeirdComponent = { type props = {\"MyWeirdProp": string} let make = props => <p> {React.string("foo")} {React.string(props.\"MyWeirdProp")} </p> }
compiles to
function make(props) { return JsxRuntime.jsxs("p", { children: [ "foo", props["\\\"MyWeirdProp\""] ] }); } let MyWeirdComponent = { make: make };
(note the "\\\"MyWeirdProp\"") whereas in v11 it used to be correct:
"\\\"MyWeirdProp\""
function make(props) { return JsxRuntime.jsxs("p", { children: [ "foo", props.MyWeirdProp ] }); } var MyWeirdComponent = { make: make };
The text was updated successfully, but these errors were encountered:
Smaller sample to reproduce:
type props = {\"MyWeirdProp": float} let x = { \"MyWeirdProp": Math.random()} Console.log(x.\"MyWeirdProp")
Link
@cristianoc would this be a problem at the end in js_dump or something happened during optimization?
js_dump
Sorry, something went wrong.
It could be the way the string is tagged, or the way js dump prints the prop name.
Successfully merging a pull request may close this issue.
In v12,
compiles to
(note the
"\\\"MyWeirdProp\""
) whereas in v11 it used to be correct:The text was updated successfully, but these errors were encountered: