11// require('babel-polyfill');
2- const { createStore } = require ( '../node_modules/redux/dist/redux' ) ;
3- const { combineReducers } = require ( '../node_modules/redux/dist/redux' ) ;
4-
5- const option = require ( 'reducers/option' ) ;
6-
7- const $ = require ( 'jquery' ) ;
8- const Counter = require ( 'components/Counter' ) ;
9- const Option = require ( 'components/Option' ) ;
10-
11- const initialState = {
12- option : {
13- count : 0 ,
14- mode : 'single'
15- }
16- }
17-
18- const combines = combineReducers ( { option } ) ;
19-
20- const store = createStore ( combines , initialState ) ;
21- store . subscribe ( render ) ;
22-
23-
24- function initRender ( ) {
25- const counter = new Counter ( { initialStore : store , container : $ ( '#optionGroup1' ) } ) ;
26- const option = new Option ( { initialStore : store , container : $ ( '#optionGroup1' ) } ) ;
27- render ( ) ;
28- }
29-
30- function render ( ) {
31- document . getElementById ( 'result' ) . innerHTML = store . getState ( ) . option . count . toString ( ) ;
32- }
33-
34- $ ( ( ) => {
35- initRender ( ) ;
36- } ) ;
2+ // const { createStore } = require('../node_modules/redux/dist/redux');
3+ // const { combineReducers } = require('../node_modules/redux/dist/redux');
4+ //
5+ // const option = require('reducers/option');
6+ //
7+ // const $ = require('jquery');
8+ // const Counter = require('components/Counter');
9+ // const Option = require('components/Option');
10+ //
11+ // const initialState = {
12+ // option: {
13+ // count: 0,
14+ // mode: 'single'
15+ // }
16+ // }
17+ //
18+ // const combines = combineReducers({ option });
19+ //
20+ // const store = createStore(combines, initialState);
21+ // store.subscribe(render);
22+ //
23+ //
24+ // function initRender() {
25+ // const counter = new Counter({initialStore: store, container: $('#optionGroup1')});
26+ // const option = new Option({ initialStore: store, container: $('#optionGroup1') });
27+ // render();
28+ // }
29+ //
30+ // function render() {
31+ // document.getElementById('result').innerHTML = store.getState().option.count.toString();
32+ // }
33+ //
34+ // $(() => {
35+ // initRender();
36+ // });
37+ //
38+ const DealDetail = require ( 'DealDetail' ) ;
0 commit comments