0

I know that the typical way to enable redux devtools on a web app is to configure it when creating your store. There are many examples of how to do this online.

What I'm wondering is, is there any method / hack I can employ to try to connect Redux DevTools to a web app that I didn't develop? Say I happen to know that some web app uses Redux, is there anything I can do / code I can run in the developer console to connect it to Redux DevTools after the fact, so that I can inspect some of the actions that are fired on the page?

React DevTools, for example, seems to work on websites that use React without having to configure it in the code.

shmth
  • 458
  • 3
  • 11

2 Answers2

0

No, it's not possible.

The Redux DevTools extension must be configured as part of the store setup process, as it actually wraps the original store.

The React DevTools work because React exposes some internal functions that the React DevTools can call to read React's data structures.

markerikson
  • 63,178
  • 10
  • 141
  • 157
0

Unfortunately, this is impossible, but I imagine how cool it would be to go to Facebook or Instagram and see what's going on there in the store.

Although of course I can be wrong and this is possible if you solve the following issues from the browser console:

  1. Install the npm package on the server where the site is stored

npm install --save @redux-devtools/extension

  1. You need to write code in the browser console that will be executed on their server, namely, you need to tell the server that now it needs to transfer information from the store to your browser extension. Find the lines of code where they create a store and add:

enter image description here

That's all, if you have any problems, write, we will help))

BuGaGa
  • 302
  • 2
  • 9