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
React & React Native Fragment-like
Lyubo Marinovb39b6640b4e0
diff --git a/react/features/app/components/AbstractApp.js b/react/features/app/components/AbstractApp.jsindex a133878ff3..029f14d3c9 100644--- a/react/features/app/components/AbstractApp.js+++ b/react/features/app/components/AbstractApp.js@@ -1,5 +1,4 @@/* global APP */-/* eslint-disable react/no-multi-comp */import PropTypes from 'prop-types';import React, { Component } from 'react';@@ -13,7 +12,7 @@ import {localParticipantJoined,localParticipantLeft} from '../../base/participants';-import { RouteRegistry } from '../../base/react';+import { Fragment, RouteRegistry } from '../../base/react';import { MiddlewareRegistry, ReducerRegistry } from '../../base/redux';import { toURLString } from '../../base/util';import { OverlayContainer } from '../../overlay';@@ -27,32 +26,6 @@ import { appNavigate, appWillMount, appWillUnmount } from '../actions';*/const DEFAULT_URL = 'https://meet.jit.si';-/**- * react-redux's {@code Provider} component only accepts a single child, so use- * a simple wrapper component in order to pass more than 1 child components.- * TODO: remove this once React Native supports Fragment (0.52 probably).- */-class Fragment extends Component {- /**- * {@code Fragment} component's property types.- *- * @static- */- static propTypes = {- children: PropTypes.node- };-- /**- * Implements React's {@link Component#render()}.- *- * @inheritdoc- * @returns {ReactElement}- */- render() {- return this.props.children;- }-}-/*** Base (abstract) class for main App component.*diff --git a/react/features/base/react/components/Fragment.js b/react/features/base/react/components/Fragment.jsnew file mode 100644index 0000000000..660c57da4b--- /dev/null+++ b/react/features/base/react/components/Fragment.js@@ -0,0 +1,30 @@+// @flow++import { Component } from 'react';++/**+ * {@code Fragment} component's property types.+ *+ * @static+ */+type Props = {+ children: React$Node+};++/**+ * react-redux's {@code Provider} component only accepts a single child, so use+ * a simple wrapper component in order to pass more than 1 child components.+ *+ * TODO Remove once React Native supports Fragment (0.52 probably).+ */+export default class Fragment extends Component<Props> {+ /**+ * Implements React's {@link Component#render()}.+ *+ * @inheritdoc+ * @returns {React$Node}+ */+ render() {+ return this.props.children;+ }+}diff --git a/react/features/base/react/components/index.js b/react/features/base/react/components/index.jsindex cda61441e4..68451b1e45 100644--- a/react/features/base/react/components/index.js+++ b/react/features/base/react/components/index.js@@ -1 +1,2 @@export * from './_';+export { default as Fragment } from './Fragment';