Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsx2hyperscript helper? #42

Open
aaronyo opened this issue Aug 9, 2019 · 1 comment
Open

jsx2hyperscript helper? #42

aaronyo opened this issue Aug 9, 2019 · 1 comment

Comments

@aaronyo
Copy link

aaronyo commented Aug 9, 2019

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..."

@davenquinn
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants