Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

Can't import state with chrome dev tools #31

Open
tjoskar opened this issue Oct 12, 2016 · 4 comments
Open

Can't import state with chrome dev tools #31

tjoskar opened this issue Oct 12, 2016 · 4 comments

Comments

@tjoskar
Copy link

tjoskar commented Oct 12, 2016

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!

@tjoskar
Copy link
Author

tjoskar commented Oct 12, 2016

It looks like the extension only filter out DISPATCH action-types

[ filter, change => change.type === ExtensionActionTypes.DISPATCH ],
but when I try to import an old state the type is of IMPORT.

@adrian-moisa
Copy link

adrian-moisa commented Oct 25, 2016

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?

@rob3c
Copy link

rob3c commented Oct 28, 2016

This looks related to #33 and probably at least has the issue with immediate unsubscription from extension changes that I mention in #33 (comment)

@mgm87
Copy link

mgm87 commented May 25, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants