From 6594841b1d1f082107bdb1489f02d3c99cff8ffa Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Wed, 4 Oct 2017 21:30:57 +0900 Subject: use createStore short-hand method --- src/content/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/content') diff --git a/src/content/index.js b/src/content/index.js index 655bea4..ea08982 100644 --- a/src/content/index.js +++ b/src/content/index.js @@ -3,16 +3,16 @@ import * as consoleFrames from './console-frames'; import * as scrolls from '../content/scrolls'; import * as navigates from '../content/navigates'; import * as followActions from '../actions/follow'; -import * as store from '../store'; +import { createStore } from '../store'; import ContentInputComponent from '../components/content-input'; import FollowComponent from '../components/follow'; import followReducer from '../reducers/follow'; import operations from '../operations'; import messages from './messages'; -const followStore = store.createStore(followReducer); -const followComponent = new FollowComponent(window.document.body, followStore); -followStore.subscribe(() => { +const store = createStore(followReducer); +const followComponent = new FollowComponent(window.document.body, store); +store.subscribe(() => { try { followComponent.update(); } catch (e) { @@ -39,7 +39,7 @@ const execOperation = (operation) => { case operations.SCROLL_END: return scrolls.scrollRight(window); case operations.FOLLOW_START: - return followStore.dispatch(followActions.enable(false)); + return store.dispatch(followActions.enable(false)); case operations.NAVIGATE_HISTORY_PREV: return navigates.historyPrev(window); case operations.NAVIGATE_HISTORY_NEXT: -- cgit v1.2.3