Skip to content

Commit

Permalink
Merge pull request #192 from mshaaban088/patch-1
Browse files Browse the repository at this point in the history
Replace deprecated lifecycle method in README
  • Loading branch information
timdorr authored May 25, 2018
2 parents e98836b + be1265d commit ba74505
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,10 @@ class SandwichShop extends Component {
);
}

componentWillReceiveProps(nextProps) {
if (nextProps.forPerson !== this.props.forPerson) {
componentDidUpdate(prevProps) {
if (prevProps.forPerson !== this.props.forPerson) {
this.props.dispatch(
makeASandwichWithSecretSauce(nextProps.forPerson)
makeASandwichWithSecretSauce(this.props.forPerson)
);
}
}
Expand Down

0 comments on commit ba74505

Please sign in to comment.