react-hyperscript icon indicating copy to clipboard operation
react-hyperscript copied to clipboard

jsx2hyperscript helper?

Open aaronyo opened this issue 5 years ago • 1 comments

Anyone know of a simple tool (cmd line would be fine) for converting a JSX snippet to a react-hyperscript snippet? My use case is making it easy to plop JSX examples into my code which is not setup for JSX.

I googled a bit and didn't find anything...

Sorry if this is an inappropriate place to post this. I guess I'm trying to slide it in under "feature suggestion..."

aaronyo avatar Aug 09 '19 20:08 aaronyo

I find that running Babel (usually I just use the REPL on their website) gets most of the way there. Then I can replace React.createElement with h and reformat

davenquinn avatar Sep 22 '21 05:09 davenquinn