Here are some docs for the generic JSX transform: JSX | ReScript Language Manual
One thing to add is that you don’t need to use hyphens to make that work, you can use @as:
type props = {
...JsxDOM.domProps,
@as("data-custom-state") dataCustomState: bool,
}
But other than that, @fham covers it very well. You can of course configure the JSX module at the rescript.json level too so you don’t need to do the file level config. And don’t be afraid of copy pasting and vendoring things, including making modifications to them, from other libs like RescriptReact. It’s a great way to tailor things the way you need for your specific use case.