I'm working on a chrome extension using React. I would like to use React devtools in dev mode, but it won't appear. I tried adding chrome://extensions/
in permissions but that isn't a valid one.
Am I missing something to enable this? Also, the Redux devtools do appear once added in the middlewares.
Asked
Active
Viewed 149 times
2

pnk6
- 276
- 3
- 15
-
Not sure how `use React devtools in dev mode` is related to chrome://extensions which is a browser UI page. Can you elaborate or illustrate the question with screenshots? – wOxxOm Apr 14 '18 at 19:54
1 Answers
1
To work with react-devtools in browser extension you should use the standalone version of react-devtools . Run in your console.
$ npm install --g react-devtools
add to you manifest.json
"content_security_policy": "connect-src ws://localhost:8097"
Now run react-devtools
Don't forget to reload your extension.
P.S.
If you don't want to install react-devtools
globally you can run npm install --save-dev react-devtools
then add to package.json
"scripts": {
"react-devtools": "react-devtools"
}
And run npm run react-devtools

Moti Korets
- 3,738
- 2
- 26
- 35