Closed
Description
I've tried to use a custom data attribute for lower case jsx.
module Div = {
type props = {
...JsxDOM.domProps,
\"data-a": string,
}
@module("react/jsx-runtime")
external jsx: (string, props) => Jsx.element = "jsx"
let make = (props: props) => jsx("div", props)
}
let customDiv = <Div name="div" data-a="a" />
FAILED: src/Abstract.ast
Syntax error!
/Users/woonki/GitHub/projects/rescript-test/src/Abstract.res:82:37
80 │ }
81 │
82 │ let customDiv = <Div name="div" data-a="a" />
83 │
I'm not sure what to parse here when looking at "-".
There are two workaround here.
- If I replace the
name
props afterdata-a
, the build is fine.<Div data-a="a" name="div" />
- If I don't format the code and keep the prop being exotic, then the build is fine.
<Div name="div" \"data-a"="a" />
Metadata
Metadata
Assignees
Labels
No labels