Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Improvement/events perf #362

Merged
merged 6 commits into from
Apr 17, 2018
Merged

Improvement/events perf #362

merged 6 commits into from
Apr 17, 2018

Conversation

boygirl
Copy link
Contributor

@boygirl boygirl commented Apr 17, 2018

@chrisbolin this PR prevents a bunch of unnecessary state mutation and filters all falsey mutations out of shared state. This is not a breaking change.

Copy link
Contributor

@chrisbolin chrisbolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. just one tiny nitpick. no need to change it

@@ -92,6 +92,9 @@ export default {

// returns all eventKeys to modify for a targeted childName
const getKeys = (childName) => {
if (target === "parent") {
return "parent";
}
if (eventReturn.eventKey === "all") {
return baseProps[childName] ?
without(Object.keys(baseProps[childName]), "parent") :
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: we're using both lodash.keys and Object.keys in this file. idk which is faster, but we might want to go with just one

@boygirl boygirl merged commit 04f08e6 into master Apr 17, 2018
@boygirl boygirl deleted the improvement/events-perf branch April 17, 2018 18:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants