How do I open react-native's dev menu on real device

后端 未结 6 2029
萌比男神i
萌比男神i 2020-12-13 01:38

I have seen already a number of border cases and strange developer interface.

From the \"shake your device\", which is really impractical, specially with a tablet

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-13 02:18

    I add a simple absolutely positioned button and this onClick handler to it

    imoprt { NativeModules } from 'react-native';
    ...
    onMenuButtonClick(){
     NativeModules.DevMenu.show();
    }
    

提交回复
热议问题