Переглянути джерело

ref(video-layout): create middleware to update video layout

The goal will be to make video layout stateless and instead
get all state from redux.
master
Leonard Kim 7 роки тому
джерело
коміт
c4b31435fb

+ 1
- 0
react/features/app/components/App.web.js Переглянути файл

@@ -5,6 +5,7 @@ import '../../base/responsive-ui';
5 5
 import { getLocationContextRoot } from '../../base/util';
6 6
 import '../../chat';
7 7
 import '../../room-lock';
8
+import '../../video-layout';
8 9
 
9 10
 import { AbstractApp } from './AbstractApp';
10 11
 

+ 1
- 0
react/features/video-layout/index.js Переглянути файл

@@ -0,0 +1 @@
1
+import './middleware';

+ 0
- 0
react/features/video-layout/middleware.native.js Переглянути файл


+ 12
- 0
react/features/video-layout/middleware.web.js Переглянути файл

@@ -0,0 +1,12 @@
1
+import { MiddlewareRegistry } from '../base/redux';
2
+
3
+/**
4
+ * Middleware which intercepts actions and updates the legacy component
5
+ * {@code VideoLayout} as needed. The purpose of this middleware is to redux-ify
6
+ * {@code VideoLayout} without having to simultaneously react-ifying it.
7
+ *
8
+ * @param {Store} store - The redux store.
9
+ * @returns {Function}
10
+ */
11
+// eslint-disable-next-line no-unused-vars
12
+MiddlewareRegistry.register(store => next => action => next(action));

Завантаження…
Відмінити
Зберегти