React Native - how to inspect the UI/ elements?

前端 未结 3 994
执念已碎
执念已碎 2021-02-13 11:00

I have installed the react dev tool. But I can\'t see it my Chrome browser when I launch my app on the emulator.

If you watch this youtube clip, you can see the

3条回答
  •  半阙折子戏
    2021-02-13 11:54

    1.Globally install

    npm install react-devtools
    
    1. If you get EACESS error because of permission problem then try with following command

      sudo npm install -g react-devtools --unsafe-perm=true

    3.Then in our project directry give command

    react-devtools
    

    It will open separate app React Native deveveloper tools

    4.copy the script from the app and paste it into our component and inspect it

提交回复
热议问题