Socket
Socket
Sign inDemoInstall

react-native-gesture-helper

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-gesture-helper

A gesture helper for React Native


Version published
Weekly downloads
120
decreased by-40.3%
Maintainers
1
Weekly downloads
 
Created
Source

React Native Gesture Helper

A small library that adds returns gesture type when gestureState is passed from the React Native pan responder.

Installation

npm install react-native-gesture-helper --save

Usage

import React, {Component} from 'react';
import getGestureType from 'react-native-gesture-helper';

class SomeComponent extends Component {
    componentWillMount: function() {
        this._panResponder = PanResponder.create({
            onPanResponderMove: (evt, gestureState) => {
                // Add the gesture detection.
                const swipeDirection = this.getSwipeDirection(gestureState);

                // Do what you will with the results here...
            }
        });
    }
}

Response

Based on the input the response returned fro the gesture should be one of the following.

  • SWIPE_UP
  • SWIPE_DOWN
  • SWIPE_LEFT
  • SWIPE_RIGHT
  • CLICK

Tests

npm test

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

FAQs

Package last updated on 02 Jun 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc