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

hiccup to jsx? #8

Open
hth2 opened this issue Feb 28, 2014 · 2 comments
Open

hiccup to jsx? #8

hth2 opened this issue Feb 28, 2014 · 2 comments

Comments

@hth2
Copy link

hth2 commented Feb 28, 2014

Is it possible to have the possibility to translate hiccup to jsx? Since jsx is more popular and is officially supported by FB, posting an example/question/bug report in jsx would increase the chance for react.hiccup users to get an answer to their question.

@lantiga
Copy link
Owner

lantiga commented Mar 1, 2014

I haven't thought about it, it could be worthwhile.
The tricky part is that sweet.js emits javascript and JSX is not javascript. However it should be possible to just emit JSX as a string. I'll look into it, thanks for the suggestion.

@kristianmandrup
Copy link

Would be awesome if we could allow for an alternative indentation based syntax as well:

div#foo.bar.baz(some: "property", another: {{props.anothervalue}})
  p "A child element"
  "Child text"

And yes, we should be able to control/configure what kind of API calls are generated, such as JSX Dom calls on MSX (Mithril "JSX" API) etc. I will likely give it a shot one of these days...

See also Compiling-JSX-with-Sweet.js

JSX "compiler" with sweet.js macros

MSX reader with Sweet.js macros to improve on basic Mithril JSX reader/compiler.

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

3 participants