Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
ref(welcome-page): use getDerivedStateFromProps, set mounted after actual mount
Leonard Kim45068f68db79
diff --git a/react/features/welcome/components/AbstractWelcomePage.js b/react/features/welcome/components/AbstractWelcomePage.jsindex b67ca3f38f..02d089ca23 100644--- a/react/features/welcome/components/AbstractWelcomePage.js+++ b/react/features/welcome/components/AbstractWelcomePage.js@@ -37,6 +37,17 @@ type Props = {export class AbstractWelcomePage extends Component<Props, *> {_mounted: ?boolean;+ /**+ * Implements React's {@link Component#getDerivedStateFromProps()}.+ *+ * @inheritdoc+ */+ static getDerivedStateFromProps(props: Props, state: Object) {+ return {+ room: props._room || state.room+ };+ }+/*** Save room name into component's local state.*@@ -77,26 +88,15 @@ export class AbstractWelcomePage extends Component<Props, *> {}/**- * Implements React's {@link Component#componentWillMount()}. Invoked- * immediately before mounting occurs.+ * Implements React's {@link Component#componentDidMount()}. Invoked+ * immediately after mounting occurs.** @inheritdoc*/- componentWillMount() {+ componentDidMount() {this._mounted = true;}- /**- * Implements React's {@link Component#componentWillReceiveProps()}. Invoked- * before this mounted component receives new props.- *- * @inheritdoc- * @param {Props} nextProps - New props component will receive.- */- componentWillReceiveProps(nextProps: Props) {- this.setState({ room: nextProps._room });- }-/*** Implements React's {@link Component#componentWillUnmount()}. Invoked* immediately before this component is unmounted and destroyed.