소스 검색

ref(audio-picker): fetch audio devices after mount

Per react migration docs, initially fetching external data is
recommended to be done in componentDidMount.
master
Leonard Kim 6 년 전
부모
커밋
3a32f7f3f0
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    2
      react/features/mobile/audio-mode/components/AudioRoutePickerDialog.js

+ 2
- 2
react/features/mobile/audio-mode/components/AudioRoutePickerDialog.js 파일 보기

@@ -109,7 +109,7 @@ class AudioRoutePickerDialog extends Component<Props, State> {
109 109
     state = {
110 110
         /**
111 111
          * Available audio devices, it will be set in
112
-         * {@link #componentWillMount()}.
112
+         * {@link #componentDidMount()}.
113 113
          */
114 114
         devices: []
115 115
     };
@@ -132,7 +132,7 @@ class AudioRoutePickerDialog extends Component<Props, State> {
132 132
      *
133 133
      * @inheritdoc
134 134
      */
135
-    componentWillMount() {
135
+    componentDidMount() {
136 136
         AudioMode.getAudioDevices().then(({ devices, selected }) => {
137 137
             const audioDevices = [];
138 138
 

Loading…
취소
저장