From 3f1113895ec4fed44652cffee3be03d1e14de109 Mon Sep 17 00:00:00 2001 From: Jonathan Berney Date: Fri, 8 Sep 2017 11:44:24 -0700 Subject: [PATCH] portals: change from componentWillMount to componentDidMount to avoid setState warning Signed-off-by: Ming Xiao --- src/react/portals/portals.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/react/portals/portals.js b/src/react/portals/portals.js index 91788134e..8df9eb542 100644 --- a/src/react/portals/portals.js +++ b/src/react/portals/portals.js @@ -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();