woonki
woonki
https://github.com/rescript-lang/rescript-vscode/issues/269#issuecomment-1148573636
I'd like to contribute to this feature. Can you share your initial idea to make this done? IMHO, these should be done for this feature. * Add compiler flag or...
One thing that came to mind is emitting the js codes separately to JSX would be tricky part. Generally, js expressions are written inside JSX.
Turning off the jsx ppx entirely doesn't seem feasible for the lower case. For example, the parser will generate the lower case jsx into below. ``` [@JSX] div(~props1=a, ()) ```...
In my opinion, the way to communicate information to the compiler emitter is by using an attribute. But the JSX PPX removes `@JSX` attribute after transformation. I guess it has...
If so, there is no reason to remove `@JSX` attribute from the AST after transformation either. It can be used by compiler emitter also. I'm going to fix the ppx...
Oops, I guess the mapper touches more than once, it throws an error. ``` Fatal error: exception Invalid_argument("JSX: the JSX attribute should be attached to a `YourModuleName.createElement` or `YourModuleName.make` call....
After turnning off, it prints as below. I think it is related to the printer. ```rescript // expected let make = ({msg}) => ReactDOMRe.createDOMElementVariadic("div", [{msg->React.string}]) // generated let make =...
It seems quite ready to support printing the preserved jsx, I guess.
I didn't jump into the preserve jsx feature deeply yet, first thing is first, I still focusing on the JSX PPX V4. Anyway, I'm getting close to the picture of...