A Component for Double Click based on TouchableOpacity Wrapper.
Build for React Native App and works on both Android and iOS.
npm install --save rn-double-click
or
yarn install rn-double-click
import React from 'react';
import { StyleSheet, Text, Alert } from 'react-native'
import DoubleClick from 'rn-double-click'
export default class App extends React.Component {
dbclick() {
Alert.alert('Double Click Succeed');
}
render() {
return (
<DoubleClick style={styles.container} onClick={this.dbclick}>
<Text>ClickMe</Text>
</DoubleClick>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
kerim selmi karimation
This project is licensed under the MIT License