Bläddra i källkod

ref(deep-linking): set initial state in constructor

master
Leonard Kim 7 år sedan
förälder
incheckning
c288d0e18c
1 ändrade filer med 4 tillägg och 12 borttagningar
  1. 4
    12
      react/features/deep-linking/components/DeepLinkingMobilePage.web.js

+ 4
- 12
react/features/deep-linking/components/DeepLinkingMobilePage.web.js Visa fil

@@ -81,23 +81,15 @@ class DeepLinkingMobilePage extends Component<Props, State> {
81 81
     constructor(props: Props) {
82 82
         super(props);
83 83
 
84
+        this.state = {
85
+            joinURL: generateDeepLinkingURL()
86
+        };
87
+
84 88
         // Bind event handlers so they are only bound once per instance.
85 89
         this._onDownloadApp = this._onDownloadApp.bind(this);
86 90
         this._onOpenApp = this._onOpenApp.bind(this);
87 91
     }
88 92
 
89
-    /**
90
-     * Initializes the text and URL of the `Start a conference` / `Join the
91
-     * conversation` button which takes the user to the mobile app.
92
-     *
93
-     * @inheritdoc
94
-     */
95
-    componentWillMount() {
96
-        this.setState({
97
-            joinURL: generateDeepLinkingURL()
98
-        });
99
-    }
100
-
101 93
     /**
102 94
      * Implements the Component's componentDidMount method.
103 95
      *

Laddar…
Avbryt
Spara