Skip to content
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

Minor optimization: remove conditional #1131

Merged
merged 2 commits into from Dec 14, 2018

Conversation

ericanderson
Copy link
Contributor

The conditional in selectDerivedProps is unnecessary. The code behaves
identically now but saves about 10% of performance for that portion of
the function.

See: https://jsperf.com/conditional-vs-not

Code left in place but commented in case someone ever wants to add
something like it back for "clarity".

The conditional in selectDerivedProps is unnecessary. The code behaves
identically now but saves about 10% of performance for that portion of
the function.

See: https://jsperf.com/conditional-vs-not

Code left in place but commented in case someone ever wants to add
something like it back for "clarity".
@netlify
Copy link

netlify bot commented Dec 14, 2018

Deploy preview for react-redux-docs ready!

Built with commit 7da8c0d

https://deploy-preview-1131--react-redux-docs.netlify.com

@timdorr
Copy link
Member

timdorr commented Dec 14, 2018

Thanks!

@timdorr timdorr merged commit 849ce41 into reduxjs:master Dec 14, 2018
webguru7 pushed a commit to webguru7/react-redux that referenced this pull request Dec 8, 2022
* Minor optimization: remove conditional

The conditional in selectDerivedProps is unnecessary. The code behaves
identically now but saves about 10% of performance for that portion of
the function.

See: https://jsperf.com/conditional-vs-not

Code left in place but commented in case someone ever wants to add
something like it back for "clarity".

* Just remove the code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants