-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.js
More file actions
30 lines (25 loc) · 861 Bytes
/
index.js
File metadata and controls
30 lines (25 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import React from "react";
import { render } from "react-dom";
import "./index.css";
import Root from "./components/Root";
import registerServiceWorker from "./registerServiceWorker";
import { createStore, applyMiddleware } from "redux";
import { rootReducer } from "./reducers";
import { queue } from "./library/queue";
import { speak } from "./library/speak";
import { persist } from "./middleware/persist";
const store = createStore(rootReducer, applyMiddleware(persist));
//const i = store.getState().items["w1"].exercises;
queue.init(store, { startIndex: 0 });
//this will be moved
const commands = speak({
start: () => {
store.dispatch({ type: "START" }, null);
},
pause: () => {
store.dispatch({ type: "STOP" }, null);
}
});
commands.start();
render(<Root store={store} />, document.getElementById("root"));
registerServiceWorker();