Skip to content

pie6k/react-native-dev-menu-on-touch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-dev-menu-on-touch

npm

Open dev menu with 3 fingers touch instead of shake.

shake

when you want to reload the app

Why?

It's annoying to shake real device every time you need dev menu. Also - it looks quite awkward if you have co-workers sitting next to you and you shake your phone every 2 minutes.

How to use

Wrap entire app inside this component

import DevMenuOnTouch from 'react-native-dev-menu-on-touch';
// or:  import { DevMenuOnTouch } from 'react-native-dev-menu-on-touch'

class YourRootApp extends Component {
  render() {
    return (
      <DevMenuOnTouch>
        <YourApp />
      </DevMenuOnTouch>
    );
  }
}

or use with higher order component

import { withDevMenuOnTouch } from 'react-native-dev-menu-on-touch';
const YourAppRoot = withDevMenuOnTouch(YourApp);

Notes

  • It's enabled only in dev mode - in production it'll return normal view without changing anything (so it's safe to use in production)
  • It's inspider by comment of @slicejunk facebook/react-native#10191 (comment)

About

Open dev menu with 3 fingers touch in react native instead of shake gesture

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published