Currently, I am working with Angular 7 alongside Ngrx and Rxjs 6. In my project, I have two lazy loaded modules named A and B, each with its own selectors and reducers.
The challenge I am facing is accessing the data stored in module B's state from module A. Due to the nature of lazy loading, the components of module B are only initialized when the user navigates to that specific route. This leads to undefined errors if I try to select the state while on module A.
What would be the recommended approach for accessing the state of a lazy loaded module in this scenario?