How to use the @ngrx/store.Reducer function in @ngrx/store

To help you get started, we’ve selected a few @ngrx/store examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fossasia / susper.com / node_modules / @ngrx / store-devtools / src / instrument.js View on Github external
export function _createReducer(dispatcher, reducer) {
    return new Reducer(dispatcher, reducer);
}
export function _createStateIfExtension(extension, injector, initialState) {
github ngrx / store-devtools / src / instrument.ts View on Github external
export function _createReducer(dispatcher: DevtoolsDispatcher, reducer) {
  return new Reducer(dispatcher, reducer);
}
github fossasia / susper.com / node_modules / @ngrx / store-devtools / src / instrument.js View on Github external
export function _createReducerIfExtension(extension, injector, reducer) {
    if (!!extension) {
        var devtoolsDispatcher = injector.get(DevtoolsDispatcher);
        return _createReducer(devtoolsDispatcher, reducer);
    }
    else {
        var dispatcher = injector.get(Dispatcher);
        return new Reducer(dispatcher, reducer);
    }
}
export function noMonitor() {
github ngrx / store-devtools / src / instrument.ts View on Github external
export function _createReducerIfExtension(extension: any, injector: Injector, reducer: any) {
  if (!!extension) {
    const devtoolsDispatcher: DevtoolsDispatcher = injector.get(DevtoolsDispatcher);

    return _createReducer(devtoolsDispatcher, reducer);
  }
  else {
    const dispatcher: Dispatcher = injector.get(Dispatcher);

    return new Reducer(dispatcher, reducer);
  }
}
github ngrx / store-devtools / lib / instrument.ts View on Github external
useFactory(dispatcher: DevtoolsDispatcher, reducer) {
    return new Reducer(dispatcher, reducer);
  }
};