I'm using redux-devtools-extension to develop a React Native app:
In the React Native debugger it works and you can see window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ and window.__REDUX_DEVTOOLS_EXTENSION__ are defined correctly.
In the chrome devtools not so.
Does anyone know how I can get these to be defined in chrome devtools? I have the redux extension installed in chrome and have tried reinstalling it.
4 Answers
I faced a similar problem, the following worked for me.
Goto extensions settings for redux Devtools in chrome extensions and check Allow Access to file URLs settings.
Extensions > Redux Devtools > Allow Access to file URLs
I had the same issue where the option REDUX did not appear in the top menu Chrome browser.
- In "Manage Extensions", I made sure Redux DevTools was active and updated.
- I reloaded the page.
- Right click >> Redux DevTools >> Open in a panel(enable in browser settings)
- Right click >> Inspect
Now, verify "Redux" appears in the top menu next to Elements, Console, ... , Lighthouse, etc.
Redux DevTools extension should be working in chrome-devtools.
1You are missing the COMPOSE__() in last line, use this way instead of your code:
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__() or this way:
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__() 1As reported here : Redux TypeError: Cannot read property 'apply' of undefined , you`ll get an 'cannot read property apply of undefined' because compose from redux expects all its arguments to be functions.
One answer from that post fixed it for me: passing a function for both truthy and falsy evaluations
window.REDUX_DEVTOOLS_EXTENSION ? window.REDUX_DEVTOOLS_EXTENSION() : f => f
