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

Change componentWillReceiveProps to componentDidUpdate #149

Merged
merged 1 commit into from
Aug 10, 2018

Conversation

kaelxeth
Copy link
Contributor

@kaelxeth kaelxeth commented Aug 8, 2018

#149

Because componentWillReceiveProps will be deprecated soon, changes made is based on Dan Abramov's statement at reactjs/react.dev#721

That’s the exact use case for componentDidUpdate and it’s more accurate than componentWillReceiveProps because it only fires when the prop has actually changed

@codecov
Copy link

codecov bot commented Aug 8, 2018

Codecov Report

Merging #149 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #149   +/-   ##
======================================
  Coverage    89.1%   89.1%           
======================================
  Files           4       4           
  Lines         101     101           
  Branches       25      25           
======================================
  Hits           90      90           
  Misses          9       9           
  Partials        2       2
Impacted Files Coverage Δ
src/with-size.js 95% <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 03b52c5...82a30b2. Read the comment docs.

@kaelxeth kaelxeth changed the title Change componentWillReceiveNextProps to componentDidUpdate Change componentWillReceiveProps to componentDidUpdate Aug 10, 2018
@ctrlplusb
Copy link
Owner

Thanks 👍

@ctrlplusb ctrlplusb merged commit 5ca018f into ctrlplusb:master Aug 10, 2018
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