I am using Angular 7 with Ngrx and Rxjs 6. I got 2 lazy loaded modules A and B which have their own selectors and reducers.
Now, I would like to access the data stored on the module B state from the module A. The problem is that all of the ngrx components of module B get initialized only when the user navigates to the lazy loaded route of B, so if the user first goes to A , attempting to select the state will result in undefined errors because B is not yet initialized.
What would be the best practice in accessing the state of a lazy loaded module in this case?