-
Notifications
You must be signed in to change notification settings - Fork 50.5k
Remove keyMirror in PropagationPhases #7596
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
Conversation
|
I don't think we can do this one. Because the keys in the object in SimpleEventPlugin use |
|
Good catch, thanks. |
| function listenerAtPhase(inst, event, propagationPhase) { | ||
| function listenerAtPhase(inst, event, propagationPhase: PropagationPhases) { | ||
| var registrationName = | ||
| event.dispatchConfig.phasedRegistrationNames[propagationPhase]; |
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.
To be specific, the problem is on this line.
GCC will crush lines like these:
{
abort: {
phasedRegistrationNames: {
bubbled: keyOf({onAbort: true}),
captured: keyOf({onAbortCapture: true}),
},
},
}into
{
a: {
b: {
c: keyOf({e: true}),
d: keyOf({f: true}),
},
},
}However, phase will be a full string:
var phase = upwards ? 'bubbled' : 'captured';and so
var registrationName =
event.dispatchConfig.phasedRegistrationNames[propagationPhase]; will give you undefined.
|
After asking on twitter, no one has actually successfully used React with GCC Advanced mode itself in a while and all the ClojureScript libraries just use React as is: https://twitter.com/Vjeux/status/770338982110429186 The plan forward is to kill with fire all the abstractions that we have in place that attempts to try to support GCC Advanced mode in order to make the codebase easier to understand. If we want to support it or some other similar optimizations going forward, we should start a separate effort for it. |
|
👍 |
See rationale in https://www.facebook.com/groups/2003630259862046/permalink/2097088000516271/ (cherry picked from commit 738a9e3)
See rationale in https://www.facebook.com/groups/2003630259862046/permalink/2097088000516271/