-
Notifications
You must be signed in to change notification settings - Fork 46.8k
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
Variable for React.DOM in jsx compile result #1975
Comments
I'm not saying you're wrong, but I think in real-life scenarios that both of those become close to immeasurable. Performance of lookups should be minimal in the scale of things and compression should eliminate the cost of the "wordiness". So I think there is little pressure to improve this, but I imagine that if you or someone else put the time in to do implement this that it would be greatly appreciated. |
I'm willing to bet a large sum of money that there are more important things to optimize elsewhere in your own code and in React before optimizing the object lookups in React.DOM.*. JSX complication may change in the future - we've talked about maybe assigning local variables or maybe dropping React.DOM entirely and forcing you to import explicitly. We're not going to put any effort into this right, maybe with recast. I don't think that anybody should spend the time right now, so I'm going to close this out. |
Hello!
JSX compile markup into
React.DOM.xxx()
functions. But when markup is complicated the result become too wordy, because of repeatingReact.DOM
It would be greate to refer to React.DOM in variable, for example, within compiled
render
methodThe text was updated successfully, but these errors were encountered: