如果我禁用了redux devtools,那么在我单击页面内的任何位置之前,应用程序页面都不会正确呈现。它不会在我的控制台上显示任何错误。
我的商店模块是
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,
}),
]
将选项strictActionWithinNgZone设置为true(默认为false(。并检查在商店更新过程中是否会出现错误。看起来你在区域外调度行动。
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.
请在此处查看https://ngrx.io/guide/store/configuration/runtime-checks