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.
This commit is contained in:
Leonard Kim 2018-05-17 15:42:21 -07:00 committed by virtuacoplenny
parent 6a1e9e256d
commit c4b31435fb
4 changed files with 14 additions and 0 deletions

View File

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

View File

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

View File

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