Mayowa Daniel
2 min readJun 5, 2020

--

Making Redux Devtools work in an Expo-managed React Native App

expo imagery

It was a wild ride.

First thing to note is that you don’t need to install any packages in your dependencies like

react-devtools,

remote-redux-devtools or

remotedev-rn-debugger

You only need one installation: the react-native-debugger.

You do NOT install it as an npm package.

The instruction here: https://github.com/jhen0409/react-native-debugger/blob/master/docs/getting-started.md says you should download the latest. This led me astray.

What I wanted to install was the “ last release of v0.10 (0.10.7)” as outlined on this page: https://github.com/jhen0409/react-native-debugger

Here’s the command to make that happen

brew update && brew cask install https://raw.githubusercontent.com/caskroom/homebrew-cask/b6ac3795c1df9f97242481c0817b1165e3e6306a/Casks/react-native-debugger.rb

I later found out I needed to follow these installation instructions instead because of the version of react native my expo installer added to my project.

It’s important you don’t change the versions of react, react native or expo that come with your expo initialization of your project. I did that and had to backtrack after I ended up with a 100% notice of the JavaScript bundle download on my device but a white screen with nothing on it.

I kept my store configuration the same as my web app so it looked like this:

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;const store = createStore(rootReducer, composeEnhancers(applyMiddleware(thunkMiddleware)));

I then followed the instructions on the getting started page (https://github.com/jhen0409/react-native-debugger/blob/master/docs/getting-started.md except the “install the latest version part”)and voila, redux and react devtools were a go.

--

--