From c288d0e18c3799432a738221ddcfbd1a8651b204 Mon Sep 17 00:00:00 2001 From: Leonard Kim Date: Mon, 29 Oct 2018 11:16:44 -0700 Subject: [PATCH] ref(deep-linking): set initial state in constructor --- .../components/DeepLinkingMobilePage.web.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/react/features/deep-linking/components/DeepLinkingMobilePage.web.js b/react/features/deep-linking/components/DeepLinkingMobilePage.web.js index 230c0484a..a5f117147 100644 --- a/react/features/deep-linking/components/DeepLinkingMobilePage.web.js +++ b/react/features/deep-linking/components/DeepLinkingMobilePage.web.js @@ -81,23 +81,15 @@ class DeepLinkingMobilePage extends Component { constructor(props: Props) { super(props); + this.state = { + joinURL: generateDeepLinkingURL() + }; + // Bind event handlers so they are only bound once per instance. this._onDownloadApp = this._onDownloadApp.bind(this); this._onOpenApp = this._onOpenApp.bind(this); } - /** - * Initializes the text and URL of the `Start a conference` / `Join the - * conversation` button which takes the user to the mobile app. - * - * @inheritdoc - */ - componentWillMount() { - this.setState({ - joinURL: generateDeepLinkingURL() - }); - } - /** * Implements the Component's componentDidMount method. *