ngrx / store-devtools

Developer Tools for @ngrx/store
MIT License
326 stars 38 forks source link

Chrome extension chart is not refreshed properly when using instrumentOnlyWithExtension() #38

Closed pmulac closed 7 years ago

pmulac commented 7 years ago

Redux devtools chrome extension: 2.9.0 ngrx/store-devtools: 3.2.2

When my state changes, I expect the chart/graph in the chrome extension to update and reflect the new state. When I call StoreDevtoolsModule.instrumentStore({ monitor: useLogMonitor() }), passing the logMonitor from the accompanying StoreLogMonitorModule, all state changes are updated live in the chrome extension graph.

However, if I call StoreDevtoolsModule.instrumentOnlyWithExtension(), the chrome extension graph is not refreshed when the state changes. If I select another tab in the chrome extension and return to the graph tab, then the graph shows the correct state.

Can we have the live-refresh functionality for the graph without having to use a custom monitor? Right now I have to instrument with the custom ngrx logMonitor and place the <ngrx-store-log-monitor> component in my app to force the chart to refresh.

zalmoxisus commented 7 years ago

The problem was that ngrx/store-devtools doesn't send monitorState (used by Chart Monitor) as redux-devtools does. Now the extension generates it from monitor reducers and should work in 2.10.0.

pmulac commented 7 years ago

@zalmoxisus Thank you, with version 2.10.0, the extension's chart now refreshes properly when using instrumentOnlyWithExtension().