This repository has been archived by the owner on Oct 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 512
Redux DevTools #493
Comments
No, just didn't have enough time to implement. If you feel fancy, give it a go. The only issue is (that I've already told @steida) that function |
I do it like this: if (process.env.NODE_ENV === 'development' && process.env.IS_BROWSER) {
const { devTools, persistState } = require('redux-devtools')
enhancers = [
// Batch React updates that occur as a result of Redux dispatches,
// to prevent cascading renders.
// https://github.com/gaearon/redux/issues/125
// https://github.com/tappleby/redux-batched-subscribe
batchedSubscribe(batchedUpdates)
]
.concat(enhancers)
.concat([
devTools(),
persistState(global.window.location.href.match(/[?&]debug_session=([^&]+)\b/))
])
} ReactDom.render(
<Provider store={store}>
<Router history={createBrowserHistory()}>
{routes}
</Router>
</Provider>,
// Never render to body. Everybody updates it.
// https://medium.com/@dan_abramov/two-weird-tricks-that-fix-react-7cf9bbdef375
document.getElementById('app')
)
if (process.env.NODE_ENV === 'development') {
ReactDom.render(
<DebugPanel top right bottom>
<DevTools store={store} monitor={LogMonitor} />
</DebugPanel>,
// Never render to body. Everybody updates it.
// https://medium.com/@dan_abramov/two-weird-tricks-that-fix-react-7cf9bbdef375
document.getElementById('debug')
)
window.React = React // enable debugger
const reactRoot = window.document.getElementById('app')
invariant(reactRoot &&
reactRoot.firstChild &&
reactRoot.firstChild.attributes &&
reactRoot.firstChild.attributes['data-react-checksum'],
'Server-side React render was discarded. ' +
'Make sure that your initial render does not contain any ' +
'client-side code.')
} |
I can take a go at it. The biggest problem is that the current version of devtools throws warnings in React 0.14. |
We're waiting for 0.14 to ship before requiring it as a peer. |
Yes. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is there a reason why we don't use this?
The text was updated successfully, but these errors were encountered: