Remove update propagation

This commit is contained in:
Shin'ya Ueoka 2017-10-28 14:10:46 +09:00
parent c4996ef5d8
commit 24c7369451
12 changed files with 23 additions and 57 deletions

View file

@ -6,12 +6,8 @@ import FrameContentComponent from './components/frame-content';
const store = createStore(reducers);
let rootComponent = window.self === window.top
? new TopContentComponent(window, store)
: new FrameContentComponent(window, store);
store.subscribe(() => {
rootComponent.update();
});
rootComponent.update();
if (window.self === window.top) {
new TopContentComponent(window, store); // eslint-disable-line no-new
} else {
new FrameContentComponent(window, store); // eslint-disable-line no-new
}