reason icon indicating copy to clipboard operation
reason copied to clipboard

Support for "string" [@JSX]

Open davesnx opened this issue 1 year ago • 2 comments

We could tag strings with the JSX attribute and run it thought a "Reason.text" or similar application where ppxes can override it. Useful to remove React.string or Jsx.text when is a Pexp_constant (Pconst_string _)

"asdasdfasdf" [@JSX]

Same as we do for the fragments, where we tag lists.

davesnx avatar Nov 05 '23 05:11 davesnx

I think this can be implement on ppx level w/o any [@JSX] attributes attached to the string literals — just need to wrap string literals which are immediate children of JSX elements.

andreypopp avatar Nov 07 '23 07:11 andreypopp

Agreed, I've relayed this to Dave privately and I'm working on a PoC to showcase this.

anmonteiro avatar Nov 07 '23 07:11 anmonteiro