React Native Debugging
Posted on April 22, 2018Of course I started of with the Chrome Debugger, http://localhost:8081/debugger-ui/
. Then I needed an Redux inspector to see the store’s current state.
I bypassed try the Facebook standalone, instead I jumped to React Native Debugger.
Install for macOS
brew update && brew cask install react-native-debugger
From Redux DevTool Extension docs, I added this to my store.js
file:
...
let store = createStore(
rootReducer,
process.env.NODE_ENV === 'development' && window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(),
compose(applyMiddleware(thunk),autoRehydrate())
);
...
Then I added the launch command to my open-project.sh
bash script.
open /Applications/React\ Native\ Debugger.app