zalmoxisus / remote-redux-devtools

Redux DevTools remotely.
http://zalmoxisus.github.io/monitoring/
MIT License
1.8k stars 138 forks source link

Empty Store #66

Closed nicolabortignon closed 7 years ago

nicolabortignon commented 7 years ago

I've tried to add the remote redux devtools, using the following syntax

const store = createStore( rootReducer, composeWithDevTools( applyMiddleware(thunk) ) )

(in this file ) When I start the app, I can see all the console.log logs in the console, but the store (State chart) is empty, the tree is empty, and no action is tracked. Any advice?

zalmoxisus commented 7 years ago

In order to not allow it in production, there's an extra step, see Enabling for more details.

nicolabortignon commented 7 years ago

So, I've edited in this way:

import { composeWithDevTools } from 'remote-redux-devtools';

const appReducer = reducers
const composeEnhancers = composeWithDevTools({ realtime: true, port: 8000 });

...
const store = createStore(
  rootReducer,
  composeEnhancers(
    applyMiddleware(thunk)
  )
)

And still the state is empty screen shot 2017-02-24 at 7 24 57 pm

Using "remote-redux-devtools": "^0.5.7" . on OSX, app is running in iOS simulator 10.0

zalmoxisus commented 7 years ago

React Native Debugger doesn't use remote-redux-devtools. You should use window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ instead of composeWithDevTools. See its repo for more details.

zalmoxisus commented 7 years ago

In case you want to try remote-redux-devtools, just remove the custom port option in your code (which implies running a local server) and check https://remotedev.io/local

nicolabortignon commented 7 years ago

Perfect, so I removed the port, selected Remote Js Debugging from the simulator, the standard chrome page opens at http://localhost:8081/debugger-ui and now I can see everything on remotedev.io.

Now, I'ma bit confused on what's the main difference between using this monitor vs using the redux devtool on chrome, or the React Native Debugger. Thoughts on this?

Thanks again for the prompt support!

zalmoxisus commented 7 years ago

All three of them use remotedev-app under the hood, so the implementations are almost identical. The difference is that React Native Debugger also includes an implementation of remote-redux-devtools, remotedev-server, react-devtools and chrome devtools.

nicolabortignon commented 7 years ago

Awesome, thanks for the clear explanation, and for the great work!