This repository was archived by the owner on Jun 15, 2023. It is now read-only.
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
JSX preserve mode with @JSX
attribute #613
Closed
Description
It is found that the attribute @JSX
makes the printer function preserve the JSX expression. #539 (comment)
Changing the JSX PPX to keep the @JSX
attribute after transformation, it prints as below. The checking of the call expression should be turned off by the way. It can be used in the compiler emitter to print the JSX in preserve mode.
// expected
let make = ({msg}) => ReactDOMRe.createDOMElementVariadic("div", [{msg->React.string}])
// generated
let make = ({msg}) => <ReactDOMRe.createDOMElementVariadic> </ReactDOMRe.createDOMElementVariadic>