1.创建项目:react-native init test
2.react-native run-ios 打开模拟器
3.react 调试
Install the react-devtools
package globally:
with yarn:
yarn global add react-devtools
or with npm:
npm install -g react-devtools
Now run react-devtools
from the terminal to launch the standalone DevTools app:
react-devtools
If you're not in a simulator then you also need to run the following in a command prompt:
adb reverse tcp:8097 tcp:8097