-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Core: organize prop & attr code to be similar #2384
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
src/attributes/attr.js
Outdated
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.
The !elem check is unnecessary see #2201
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.
|
@campersau Good catch.
Thoughts? |
src/attributes/attr.js
Outdated
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.
This variable might not be benefiting us in either method. I'd check the impact of removing it.
|
This is good (-35 min+gz). Can you also look at increasing the return similarities (from |
|
@gibson042 No problem. Regarding checking if |
Drop it from both. |
|
Ok rebased what was noted so far... Will continue trying to create similarities... |
|
@gibson042 I think the module |
|
There is also an inconsistency where in Is there are reason for that? edit I now see that in |
What do you mean? That method is provided by |
|
I mean |
It is intentional, but surprisingly not documented! That inconsistency should be preserved by this pull request, as should the string coercion in |
|
Ah. prop.js should also import |
|
@gibson042 Great... I think I implemented all of the changes. Also flattened the multiple nested ifs (I highly dislike the nested ifs and prefer the early returns. |
|
@pgilad we're ready to land this, but could you also provide a pull for the |
|
Thank you! |
No description provided.