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
Include $$typeof on inlined React elements #2352
Conversation
Did I do this right? Ideally this could be in a Babel release before the React 0.14 RC that we're planning to push out tomorrow. Sorry for the late notice. |
All the tests here will need to be updated too. I can push out a new 5.x release just for this if you want. 5.x is feature frozen until Babel 6 but I guess this falls somewhere under the realm of a bug fix. |
@@ -0,0 +1 @@ | |||
(typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) || 0xeac7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double quotes please.
This made debugging babel#2352 confusing because I had some vim swap files so it didn't load any of the templates. (I assume this was the original intention.)
Fixed the quotes and the tests. |
@@ -1,6 +1,9 @@ | |||
"use strict"; | |||
|
|||
var _typeofReactElement = typeof Symbol === "function" && Symbol["for"] && Symbol["for"]("react.element") || 60103; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kinda unfortunate that we lose our hex speak here. :) Consider this an enhancement request to preserve hex literals by default?
We should make sure that the order is the same for the hidden class. $$typeof, type, key, ref, props, _owner |
Yeah, okay. Pushed ^ as a separate commit. |
Include $$typeof on inlined React elements
Thanks @spicyj! |
Thank you! |
Released as of 5.8.23 |
@sebmck Is that a typo (s/5.8.23/5.8.24/)? Also mentioned here: #2282 (comment) |
Yeah, whoops. |
@sebmck I was just thinking it might make sense to update that in the comments so people don't get confused, but maybe it's not that important. |
See facebook/react#4832.