-
-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Open
Description
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
var createElement = require('react').createElement
createElement(...)Could be a custom Babel transform. Could be a transform that inserts _createReactElement into scope and specifies it as the JSX pragma.
bfricka, mixtur, RyanLamanskyInsite and 2betop