react-touch-mixin

0.1.1 • Public • Published

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

205

version

0.1.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability