I am using NGRX within my application. But within my Angular Library I want to join that NGRX module and add to it. However, when I try to call StoreModule.forRoot() within the library, I can't. Because I already called it once in the main application.
imports: [
CommonModule,
IonicModule,
CompoLoginRoutingModule,
ReactiveFormsModule,
TranslateModule.forRoot({
loader: {
deps: [HttpClient],
provide: TranslateLoader,
useFactory: (createTranslateLoader),
},
}),
StoreModule.forRoot(reducers, { // This is a problem
runtimeChecks: {
strictStateImmutability: true,
strictActionImmutability: true,
},
metaReducers,
}),
Is there a right way to join the NGRX of the main application?