Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use with freezer-js #2

Closed
arqex opened this issue Oct 27, 2015 · 6 comments
Closed

Use with freezer-js #2

arqex opened this issue Oct 27, 2015 · 6 comments
Labels

Comments

@arqex
Copy link

arqex commented Oct 27, 2015

Hi @zalmoxisus

Thanks for this great extension, will it be in the extension store soon?

I have created a binding to use redux-devtools with a freezer-js app and I think this extension would be much better for freezer developers than including all redux libraries needed in order to make the devtools work.

So I am trying to build a binding to your extension, but it is not working so far. Currently I am creating the redux store like:

       Redux.compose(
        FreezerMiddleware( State ),
        window.devToolsExtension || function(f){ return f }
    )(Redux.createStore)( function( state ){ return state } );

Inside FreezerStoreEnhancer I get the main app store like:

store = next( reducer )

For standard devTools I have a store that have the devToolsStore attribute inside that I hijack to make the communication between the devtools and freezer.

For the extension I find I have the liftedStore attribute, that I expected to be the same, but it never dispatches the @@INIT action, so the extension is not playing well with the binder.

Do you see something I am doing wrong? Can you explain the differences between standard devToolsStore and yours liftedStore? Is there a way of loading your extension in a dev mode to see the code unminified and makes debug easier?

Cheers

@zalmoxisus
Copy link
Owner

Hey @arqex

Actually, it's not my liftedStore :) The new Redux DevTools (3.0.0-beta-3) uses it instead of devToolsStore, and there are a lot of breaking changes there. So, if your app works with Redux DevTools 3.0.0, it should work with the extension as well.

Thanks for the kind words and for the suggestions! If you have some reasons not to update the DevTools (and not to use React 0.14), we may work in this direction to extend it. We may use different versions of the Redux DevTools in the extension, but it would be too complex (especially to have 2 versions of React), so I want to be sure that it is in demand.

I do want to support as much user cases as possible, and of course it will be on Chrome Webstore (as indicated in the Roadmap).

@zalmoxisus
Copy link
Owner

The code is in the ./src/app and ./src/browser/extension.
Use npm start to start in the dev mode, and load the ./dev folder instead of ./build/extension.
I should add that to the readme.

@arqex
Copy link
Author

arqex commented Oct 28, 2015

Thanks for the prompt reply.

No problem I will adapt the library to support the new version of redux-devtools, it shouldn't be difficult with you instructions. Don't worry about supporting other redux versions, I think your app would work well with any of them, it is my library that hacks redux a bit, the one to adapt.

I will give it a try this afternoon and let you know.

@arqex
Copy link
Author

arqex commented Nov 3, 2015

Finally I got the freezer app working with redux-devtools chrome extension!! :)

http://freezer-redux-devtools.divshot.io/

Runing the extension in dev mode helped a lot, thanks!!

@zalmoxisus
Copy link
Owner

Awesome! It even works with persist state: http://freezer-redux-devtools.divshot.io/?debug_session=test (use the extension in dev, click then refresh and you will not lose the devtools' history).

@zalmoxisus
Copy link
Owner

Added your implementation to the README.

Feel free to open this ticket or open another one if something goes wrong.

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

No branches or pull requests

2 participants