Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        var enhancer = Redux.composeEnhancer(new Redux.Enhancer[] {
            Redux.applyMiddleware(new Redux.Middleware[] {
                ReduxMiddleware.createLogger,
                ReduxMiddleware.createCrashReport
            }),
            Redux.Devtools.instrument(this.onChangeMonitoredState)
        });

        this.store = Redux.createStore(TodoList.reducer, null, enhancer);
        this.store.subscribe(this.onChangeState);
        this.onChangeState(this.store);
    }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        var finalReducer = Redux.combineReducers(new Redux.Reducer[] {
            Reducers.todos,
            Reducers.visibilityFilter
        });

        var enhancer = Redux.composeEnhancer(new Redux.Enhancer[] {
            Redux.applyMiddleware(new Redux.Middleware[] {
                ReduxMiddleware.createLogger,
                ReduxMiddleware.createCrashReport
            }),
            Redux.Devtools.instrument(this.onChangeMonitoredState)
        });

        this.store = Redux.createStore(finalReducer, null, enhancer);
        this.store.subscribe(this.onChangeState);
        this.onChangeState(this.store);
    }