zalmoxisus / store-devtools

Developer Tools for @ngrx/store

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@ngrx/store-devtools

Join the chat at https://gitter.im/ngrx/store

Devtools for @ngrx/store.

Installation

npm install @ngrx/store-devtools --save

Instrumentation

Instrumentation with the Chrome Extension (Preferred)

  1. Download the Redux Devtools Extension

  2. In your root Angular module import StoreDevtoolsModule.instrumentOnlyWithExtension():

import { StoreDevtoolsModule } from '@ngrx/store-devtools';

@NgModule({
  imports: [
    StoreModule.provideStore(rootReducer),
    StoreDevtoolsModule.instrumentOnlyWithExtension()
  ]
})
export class AppModule { }

Instrumentation with a Custom Monitor

To instrument @ngrx/store and use the devtools with a custom monitor you will need to setup the instrumentation providers using instrumentStore():

import {StoreDevtoolsModule} from '@ngrx/store-devtools';

@NgModule({
  imports: [
    StoreModule.provideStore(rootReducer),
    // Note that you must instrument after importing StoreModule
    StoreDevtoolsModule.instrumentStore({
      maxAge: 5,
      monitor: monitorReducer
    })
  ]
})
export class AppModule { }

See @ngrx/store-log-monitor for an example monitor built for Angular 2

Contributing

Please read contributing guidelines here.

About

Developer Tools for @ngrx/store

License:MIT License


Languages

Language:TypeScript 95.6%Language:JavaScript 4.4%