2.0.0 • Published 1 year ago

@valor/nativescript-ngrx-devtools v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

nativescript-ngrx-devtools

This plugin allows you to use NgRx devtools with NativeScript.

Installation

Firstly, run:

npm i @valor/nativescript-ngrx-devtools @valor/nativescript-websockets

Import @valor/nativescript-websockets in your polyfills.ts:

/**
 * NativeScript Polyfills
 */

// Install @nativescript/core polyfills (XHR, setTimeout, requestAnimationFrame)
import '@nativescript/core/globals';

import '@valor/nativescript-websockets'; // add this line!

// Install @nativescript/angular specific polyfills
import '@nativescript/angular/polyfills';

/**
 * Zone.js and patches
 */
// Add pre-zone.js patches needed for the NativeScript platform
import '@nativescript/zone-js/dist/pre-zone-polyfills';

// Zone JS is required by default for Angular itself
import 'zone.js';

// Add NativeScript specific Zone JS patches
import '@nativescript/zone-js';

Then add NativeScriptNgRxDevtoolsModule.forRoot() to your AppModule imports:

@NgModule({
  imports: [
    StoreModule.forRoot(...),
    StoreDevtoolsModule.instrument(),
    NativeScriptNgRxDevtoolsModule.forRoot(),
  ],
  exports: [StoreModule],
})
export class AppModule {}

By default the plugin will try to connect to the devtools on port 8000 on the default IPs provided by NativeScript (__NS_DEV_HOST_IPS__), but this can be configured by passing an options object to NativeScriptNgRxDevtoolsModule.forRoot().

To start debugging install the latest @redux-devtools/cli:

npm i -g @redux-devtools/cli

Then open them:

redux-devtools --open
2.0.0

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.1-alpha.1

2 years ago

0.0.1-alpha.0

2 years ago