1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { App } from './containers/app';
import { store } from './store';
import { setTopic, setDisplayMode } from './actions';
store.dispatch(setTopic('javascript'));
store.dispatch(setDisplayMode('THUMBNAIL'));
ReactDOM.render(
<Provider store={store}>
<App />
</Provider>,
document.getElementById('example')
)
function showState() {
const state = store.getState();
debugger
}
store.subscribe(showState);
|