From fb6658e446a5c38cab7c48179fa02716cd2246c0 Mon Sep 17 00:00:00 2001 From: Tom Chen Date: Sat, 16 Sep 2017 12:40:23 +0800 Subject: [PATCH] fix(addons/InfoBox): use setState in lifecycle --- src/components/addons/InfoBox.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/addons/InfoBox.jsx b/src/components/addons/InfoBox.jsx index 76dd9884..b84b06fa 100644 --- a/src/components/addons/InfoBox.jsx +++ b/src/components/addons/InfoBox.jsx @@ -108,9 +108,9 @@ export class InfoBox extends React.PureComponent { const infoBox = new GoogleMapsInfobox() construct(InfoBox.propTypes, updaterMap, this.props, infoBox) infoBox.setMap(this.context[MAP]) - this.state = { + this.setState({ [INFO_BOX]: infoBox, - } + }) } componentDidMount() {