diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-04 21:30:57 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-04 21:30:57 +0900 |
commit | 6594841b1d1f082107bdb1489f02d3c99cff8ffa (patch) | |
tree | 594f2eb56b43143e5dba30317a9e8a3cbf578051 /src/content | |
parent | 482206f6c90985011b197623854b8bfbc26ee54c (diff) |
use createStore short-hand method
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/index.js | 10 |
1 files changed, 5 insertions, 5 deletions
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: |