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

feat(Icon|Flag): PureComponent for Icon/Flag #2067

Closed
wants to merge 2 commits into from
Closed

feat(Icon|Flag): PureComponent for Icon/Flag #2067

wants to merge 2 commits into from

Conversation

brianespinosa
Copy link
Member

@brianespinosa brianespinosa commented Sep 11, 2017

Per comments here, I have added in support for PureComponent in Icon and Flag. It looks like since that discussion happened last, someone has already added support for SCU and shallowEqual so adding PureComponent was the last piece for this.

@brianespinosa brianespinosa changed the title PureComponent for Icon/Flag feat(Icon|Flag): PureComponent for Icon/Flag Sep 11, 2017
@codecov-io
Copy link

Codecov Report

Merging #2067 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2067   +/-   ##
=======================================
  Coverage   99.76%   99.76%           
=======================================
  Files         149      149           
  Lines        2588     2588           
=======================================
  Hits         2582     2582           
  Misses          6        6
Impacted Files Coverage Δ
src/elements/Flag/Flag.js 87.5% <ø> (ø) ⬆️
src/elements/Icon/Icon.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d288f3b...20d08a5. Read the comment docs.

@layershifter
Copy link
Member

layershifter commented Sep 11, 2017

@brianespinosa Thanks for the contribution, but we can't merge it. I've done these changes in #2011, in fact this equal to the PureComponent:

  shouldComponentUpdate(nextProps) {
    return !shallowEqual(this.props, nextProps)
  }

We also support range of react vesions, while PureComponent was introduced in 15.3.

@brianespinosa
Copy link
Member Author

ha thanks @layershifter it took me so long to get to the updates that you beat me to it.

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.

3 participants