Socket
Socket
Sign inDemoInstall

react-tap-event-plugin

Package Overview
Dependencies
34
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.3 to 0.1.4

2

package.json
{
"name": "react-tap-event-plugin",
"version": "0.1.3",
"version": "0.1.4",
"description": "Facebook's TapEventPlugin, temporarily available on npm until its made public in their repo",

@@ -5,0 +5,0 @@ "main": "src/injectTapEventPlugin.js",

@@ -0,1 +1,2 @@

# Introduction
You've probably heard of [iOS's dreaded 300ms tap delay](http://updates.html5rocks.com/2013/12/300ms-tap-delay-gone-away). React's `onClick` attribute falls prey to it. Facebook's working on a solution in the form of `TapEventPlugin`, but it [won't be made available](https://github.com/facebook/react/issues/436) [until 1.0](https://github.com/facebook/react/pull/1170).

@@ -5,7 +6,29 @@

Usage is simple:
When Facebook solves [#436](https://github.com/facebook/react/issues/436) and [#1170](https://github.com/facebook/react/pull/1170), this repo will disappear.
var injectTapEventPlugin = require("react-tap-event-plugin");
injectTapEventPlugin();
## Usage
When Facebook solves [#436](https://github.com/facebook/react/issues/436) and [#1170](https://github.com/facebook/react/pull/1170), this repo will disappear.
```js
var injectTapEventPlugin = require("react-tap-event-plugin");
injectTapEventPlugin();
```
## Example
```js
var React = require('react'),
injectTapEventPlugin = require("react-tap-event-plugin");
injectTapEventPlugin();
var Main = React.createClass({
render: function() {
return <button onTouchTap={this._handleTouchTap}>Tap Me</button>
},
_handleTouchTap: function() {
alert('Tap');
}
});
React.render(<Main />, document.body);
```

@@ -86,3 +86,2 @@ /**

dependencies.push(
topLevelTypes.topTouchCancel,
topLevelTypes.topTouchEnd,

@@ -89,0 +88,0 @@ topLevelTypes.topTouchStart,

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc