You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any way to read the information that is currently in the redux store from outside of the application?
In react this would be possible by doing something like this before the react application is set up:
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = {
supportsFiber: true,
inject: function(react) {
console.log('inject', react);
},
onCommitFiberRoot: function (rendererID, root) {
console.log('this is an initialized react app', root);
},
onCommitFiberUnmount: function (rendererID, fiber) {
console.log('unmount', arguments);
}
};
Essentially you are faking a devtools plugin which is not there and mocking up your own object with the hooks that are in the react-devtools repository.
The text was updated successfully, but these errors were encountered:
We're not exposing the store object on purpose as many are using it in production. That can be easily done by just adding window.store = store in your store creator or by adding a custom store enhancer.
But there's a plan for future versions to have a button to expose it when needed, together with the actions/states history for debugging from the console.
@stephan-v for now you can get it from Redux DevTools, just click on Provider component and it'll be in props, which can be accessed from $r. Or you can get it from Sources like here.
Is there any way to read the information that is currently in the redux store from outside of the application?
In react this would be possible by doing something like this before the react application is set up:
Essentially you are faking a devtools plugin which is not there and mocking up your own object with the hooks that are in the react-devtools repository.
The text was updated successfully, but these errors were encountered: