瀏覽代碼

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

master
Leonard Kim 7 年之前
父節點
當前提交
c288d0e18c
共有 1 個文件被更改,包括 4 次插入12 次删除
  1. 4
    12
      react/features/deep-linking/components/DeepLinkingMobilePage.web.js

+ 4
- 12
react/features/deep-linking/components/DeepLinkingMobilePage.web.js 查看文件

@@ -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
      *

Loading…
取消
儲存