Skip to content

Commit

Permalink
portals: change from componentWillMount to componentDidMount to avoid…
Browse files Browse the repository at this point in the history
… setState warning

Signed-off-by: Ming Xiao <mxiao@pivotal.io>
  • Loading branch information
Jonathan Berney authored and Ming Xiao committed Sep 8, 2017
1 parent 37c9e99 commit 3f11138
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/react/portals/portals.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class PortalSource extends React.PureComponent {
this.state = {destination: null};
}

componentWillMount() {
componentDidMount() {
emitter.on('destination', this.setDestination);
this.setDestination();
this.componentDidUpdate();
Expand Down

0 comments on commit 3f11138

Please sign in to comment.