-
Notifications
You must be signed in to change notification settings - Fork 463
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
Make usage of _
in object keys consistent between external and JSX
#4348
Comments
Is this your desired behavior or current behavior? It is a bit strange to me where such name mangling happens JSX: <button type_="button" /> Compiles to: var React = require("react");
React.createElement("button", {
type: "button"
}); |
This is the current behavior. The desired one is: type t;
[@bs.obj] external make: (~type_: string) => t = "";
let x = make(~type_="x"); Would compile to: var x = {
type: "x"
}; |
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. |
Not stale. |
The issue is solved. |
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. |
JSX:
Compiles to:
external
:Compiles to:
But when bindings to React components meet
external
, it's required to use prefix form:So on the call site it's:
The text was updated successfully, but these errors were encountered: