Where in Angular app should I call devTools() #30
Unanswered
thomas-w-grant
asked this question in
Q&A
Replies: 1 comment 3 replies
-
When I change the code for
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
❓ Where in my Angular app should I make the call to
devTools()
?It seems like no matter where I put my call to
devTools()
, I get the message in the redux dev tool extension that there is no store defined. I have tried inmain.ts
,app.module
, andapp.compontnet.ts
.When I look at the source code for
devTools
method, I see that onlyregister$
is being observed. There is no check for existing stores in the register before subscribing toregister$
. It seems to me that this code will only work ifdevTools
is called before any stores are added to register. When I follow Elf documentation for the repository pattern, I see thatnew Store
is called outside of the class. No matter where I have placed my call todevTools
, the store is always created first. Which means thedevTools
is never aware of any stores and hence why I get the message in the extension saying there are no stores.Beta Was this translation helpful? Give feedback.
All reactions