react-native-egg make your react native app infinitely more fun !!
Switch branches/tags
Nothing to show
Clone or download
FuYaoDe Merge pull request #1 from leecrossley/master
Switch React.PropTypes to PropTypes package
Latest commit 6b3fbed Oct 2, 2017
Permalink
Failed to load latest commit information.
example Bump version Oct 2, 2017
.gitignore Use PropTypes package Oct 2, 2017
Egg.js Use PropTypes package Oct 2, 2017
README.md Bump version Oct 2, 2017
package-lock.json Bump version Oct 2, 2017
package.json Bump version Oct 2, 2017

README.md

react-native-egg

react-native-egg make your react native app infinitely more fun !!

Implementation simple gestures detection achieve trigger easter egg, You can also use it as a gesture switch.

Why ?

Just for fun !!

Example code

Hide some secret message.

Example code

Hide and Trigger some features.

Example code

Add it to your project

$ npm i react-native-egg --save

Basic usage

Use like a <View>, but the children can not have onPress、onScroll props, like ScrollViewListViewTouchableOpacity.

import Egg from 'react-native-egg';

<Egg style={styles.container}
  setps={'TTT'}
  onCatch={() => {
    Alert.alert('Version', '1.0.1');
  }}
>
  <Text>FuYaoDe</Text>
  <Text>dan82625@gmail.com</Text>
</Egg>

Props

Prop PropType Default Value Description
setps string UUDDLRLRTT Trigger onCatch conditions,U is slide up,D is slide down,R is slide right,L is slide left,T is click. Max string length is 15.
timeLimit number 2000 combo limit time in milliseconds.
onCatch func combo equal setps trigger onCatch.
onAction (event) => {} Any touch will trigger. event has the following UDRLT
touchOpacity bool false make <Egg> look like <TouchableOpacity>