Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit bf6d625

Browse files
author
steven nguyen
authored

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/atom/commands.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ export class Command extends React.Component {
5353
this.observeTarget(this.props);
5454
}
5555

56-
componentWillReceiveProps(newProps) {
57-
if (['registry', 'target', 'command', 'callback'].some(p => newProps[p] !== this.props[p])) {
58-
this.observeTarget(newProps);
56+
componentDidUpdate(prevProps) {
57+
if (['registry', 'target', 'command', 'callback'].some(p => prevProps[p] !== this.props[p])) {
58+
this.observeTarget(this.props);
5959
}
6060
}
6161

0 commit comments

Comments
 (0)