New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-native-double-click

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-double-click

React Native Double Click/Tap

latest
Source
npmnpm
Version
1.0.5
Version published
Weekly downloads
38
-5%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-double-click

A Component Wrapper for Double Click/Tap, made for React Native, works on both Android and iOS.

Installation

  • npm install --save react-native-double-click

Usage

import React, { Component } from 'react';
import {
  Text,
  View,
  Alert,
} from 'react-native';
import DoubleClick from 'react-native-double-click';

export default class doubleClicker extends Component {
  constructor() {
    super();

    this.handleClick = this.handleClick.bind(this);
  }

  handleClick() {
    Alert.alert('This is awesome \n Double tap succeed');
  }

  render() {
    return (
      <View style={{ flex: 1, marginTop: 50 }}>
        <Text style={{ fontSize: 20 }}>
          Welcome to React Native!
        </Text>
        <DoubleClick onClick={this.handleClick}>
          <Text style={{ fontSize: 26 }}>
            Please tap me twice!
          </Text>
        </DoubleClick>
      </View>
    );
  }
}

Props

PropertyTypeDefaultDescription
delaynumber300(in milliseconds) How fast double click/tap be pressed (number below 200 might not worked)
radiusnumber20Radius for click/tap
onClickfunction() => Alert.alert('Double Tap Succeed')Execute function after double click/tap be pressed

License

MIT

Keywords

react

FAQs

Package last updated on 17 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts