Normally Palatable Mango
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    react-touch-mixinpublic

    React Touch Mixin

    Mixin to enable touch interactions in React components.

    Usage

    // myComponent.js
    var react = require('react');
    var touchMixin = require('react-touch-mixin');
     
    module.exports = react.createClass({
      mixins: [touchMixin],
      render: function () {
        /* ... */
      }
    });
     
    // application.js
    var react = require('react');
    var myComponent = require('./myComponent');
     
    react.render(myComponent({
      onTap: function () {
        console.log('You tapped!');
      }
    }), someDOMNode);
     

    Note: Currently only the “tap” event is supported.

    Keywords

    none

    install

    npm i react-touch-mixin

    Downloadsweekly downloads

    294

    version

    0.1.1

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar