- download react-native-debugger from releases page
- unzip package and launch
rn-debugger-linux-x64/react-native-debugger
(may be you'll need runchmod
) - in you react-native app folder run:
### NPM
npm i --save-dev react-native-debugger-open # or -g
npm i redux-devtools-extension
### YARN
yarn add -D react-native-debugger-open # yarn global add ...
yarn add redux-devtools-extension
Setup store.js
import {createStore, applyMiddleware} from 'redux';
import {composeWithDevTools} from 'redux-devtools-extension';
import mainReducer from './reducers/main-reducer'; //your reducer
const composeEnhancers = composeWithDevTools({realtime: true, port: 8081}); //possible to run without arguments
const store = createStore(
mainReducer,
/* preloadedState, */ composeEnhancers(/*connect of middelwares*/),
);
export default store;
run:
REACT_DEBUGGER="rndebugger-open --open --port 8081" npm start # or yarn start
-
after, enable debug (press
D
in terminal) -
launch
react-native run-android // or run-ios
-
start
./react-native-debugger
which you downloaded earlyenjoy