actions.js components book.css book.js books.js controls.js displayModeOptions.js history.js stateviewer.js topicselector.js containers app.js books.js controls.js history.js stateviewr.js topicselector.js images app.js index.html index.js middleware.js node_modules package.json reducers.js statehistory.js store.js webpack.config.js |
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); |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |