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

Redux Devtools : react-native-debugger #5

Open
sujinleeme opened this issue May 1, 2018 · 0 comments
Open

Redux Devtools : react-native-debugger #5

sujinleeme opened this issue May 1, 2018 · 0 comments

Comments

@sujinleeme
Copy link
Owner

sujinleeme commented May 1, 2018

package: https://github.com/jhen0409/react-native-debugger
Issue : redux devtool doesn't get any data

solution
In fact window.REDUX_DEVTOOLS_EXTENSION_COMPOSE will only be available if you start remote debugging. If it's stopped an error will be thrown. So checking is needed unless you want a red screen:

const middleware = applyMiddleware(pouchMiddleware);//pick your middleware flavors here

export default ( undefined === window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) ?
    createStore( reducers, middleware ) :
    createStore(reducers,
        window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__(
            middleware
        )
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant