-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add JSX support #3
Labels
Comments
Fully implemented in v0.9.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Jsx is now widely used in multiple frontend frameworks like React and Vue.js. After a while of thinking I found that having jsx in ef.js projects is pretty possible. Here is an example:
the jsx part will be transpiled into:
or with
ef.createElement
:If we map needed props to the component class it self, things could be more easy like:
Using the first implementation we should write our own transpilers, while with the second implementation, we could just use the existing jsx transpilers to have the transpiling done like
babel
andbuble
. Using the second approach could be more convenient when project bootstraps.The text was updated successfully, but these errors were encountered: