-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Compile JSX to direct createElement() calls #5435
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
Comments
We should still require |
Hi @gaearon I would like to pick this up! I have never worked on babel custom transfrom. it would be great if you can point me to some resource for the same(meanwhile I will google and try to understand how custom Babel transform can be implimented.) |
We can use this: |
Would be happy to pick this up if the proposed solutions do not look good enough. |
Due to how webpack works today with CommonJS, we pay the cost of three object property accesses (
ReactWebpackBinding.default.createElement
) for every JSX call. It doesn't minify well and has a minor effect on runtime performance. It's also a bit clowny.We should fix this to compile JSX to something like
Could be a custom Babel transform. Could be a transform that inserts
_createReactElement
into scope and specifies it as the JSX pragma.The text was updated successfully, but these errors were encountered: