Angular app with NgRx not working properly without redux devtools extension

993 views Asked by At

If I have redux devtools disabled the app page is not rendering properly until I click anywhere inside the page. It does not display any error on my console.

My store module is

imports: [
    StoreModule.forRoot(reducers, { metaReducers }),
    EffectsModule.forRoot(effects),
    StoreDevtoolsModule.instrument({ maxAge: 25 }),
    // !environment.production && remote flag (dev) & authenticated ? StoreDevtoolsModule.instrument({ maxAge: 25 }) : [],
    StoreRouterConnectingModule.forRoot({
      serializer: CustomSerializer,
    }),
  ]
1

There are 1 answers

1
Alexander Nikolenko On

set options strictActionWithinNgZone to true (false by default). And check if you'll get error during store update. Looks like you dispatch action out of Zone.

strictActionWithinNgZone
The strictActionWithinNgZone check verifies that Actions are dispatched by asynchronous tasks running within NgZone. Actions dispatched by tasks, running outside of NgZone, will not trigger ChangeDetection upon completion and may result in a stale view.

Check it here https://ngrx.io/guide/store/configuration/runtime-checks