-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
optimize compat by hoisting the vnode handling func #3941
Conversation
Size Change: +55 B (0%) Total Size: 54.3 kB
ℹ️ View Unchanged
|
8b42294
to
d9abd68
Compare
|
||
if (props.class != props.className) { |
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.
What happened before:
- props.class === undefined && props.className !== undefined --> we would make className enumerable and make class === className
- props.class !== undefined && props.className === undefined --> we would make className not enumerable and make className return props.class
- props.class !== undefined && props.className !== undefined --> we would make className enumerable and make class === className
Position 1 and 3 are different because we are just returning the value for className
rather than the one for class, I don't think this matters.
Position 2 is different because we aren't introducing a getter for className
to return class
, I don't think this matters
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.
Thanks for checking. That sounds reasonable. I'm good with merging the PR 👍
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.
Yep that seems reasonable to me. I think the dynamic assignment of enumerable
here was from when we used to make class
a descriptor too.
This seems to significantly improve performance from a V8 Point of View for RTS
current is this, compat is the 10.13.1 release