store-devtools
store-devtools copied to clipboard
Can't import state with chrome dev tools
Hi,
I'm using this project with chrome dev tools and I'm loving it so thanks for your hard work.
However, I'm missing a feature where you can replace a current state with a saved one. It works fine with a pure react app like this one: http://zalmoxisus.github.io/examples/todomvc/ https://www.youtube.com/watch?v=JdybTliFl4I
But if I use chrome dev tools with the ngrx example app (or any other ngrx app) I'm not able to import the state: https://www.youtube.com/watch?v=5wD_GyEUHJc
Is this a bug or do store-devtools not suport this feature (replacing the store)?
I'm currently using the following versions of ngrx and angular:
@angular/common: 2.0.1
@angular/compiler: 2.0.1
@angular/core: 2.0.1
@angular/http: 2.0.1
@angular/platform-browser: 2.0.1
@angular/platform-browser-dynamic: 2.0.1
@ngrx/core: 1.2.0
@ngrx/effects: 2.0.0
@ngrx/store: 2.2.1
@ngrx/store-devtools: 3.1.0
And are bootstrapping store-devtools
with:
@NgModule({
declarations: ...,
imports: [
StoreModule.provideStore(reducers, initState()),
EffectsModule.run(SomeEffects1),
EffectsModule.run(SomeEffects2),
StoreDevtoolsModule.instrumentOnlyWithExtension()
],
bootstrap: ...,
providers: ...
})
Thanks!
It looks like the extension only filter out DISPATCH
action-types https://github.com/ngrx/store-devtools/blob/6e880ba68958e24a78dce05d5bb8a75b09999ad5/src/extension.ts#L84 but when I try to import an old state the type is of IMPORT
.
I have the same issue as the one you stated. Looks like you found a solution in #225@ngrx/store. I was able to hardcode the initial state using the second param of the provideStore function. However I'd like to make use of the dev-tools ui for this step. Can you provide a small code sample with the solution?
This looks related to https://github.com/ngrx/store-devtools/issues/33 and probably at least has the issue with immediate unsubscription from extension changes that I mention in https://github.com/ngrx/store-devtools/issues/33#issuecomment-257005059
I'm also having problems with this. Has anyone found a workaround or fix? A lot of why I want ngrx is so my QA can send me his state when he finds bugs. Very disappointed when I found this wasn't working.