zilverline / react-tap-event-plugin

Instant TapEvents for React
http://facebook.github.io/react/
MIT License
1.07k stars 110 forks source link

Tap invalid when use react with cdn #73

Closed beiciye closed 8 years ago

beiciye commented 8 years ago

Hi !

When I put React separated from the bundle , onTouchTap event does not fire. If I React packaged bundle in , onTouchTap on the effective. Could you help me ?

madjam002 commented 8 years ago

I don't understand what you are trying to do...?

Are you trying to load React from a CDN and then package the rest of your app with webpack/browserify?

If so, I don't think it will work.

beiciye commented 8 years ago

yeah! I have done all of these ,and it will not work.

madjam002 commented 8 years ago

Yeah it's not designed to, you can't load React from a CDN and use tap event plugin.

beiciye commented 8 years ago

I think i should post my code

/index.js

import injectTapEventPlugin from "react-tap-event-plugin";
injectTapEventPlugin({
    shouldRejectClick: function (lastTouchEventTimestamp, clickEventTimestamp) {
        return true;
    }
});

I use it like onTouchTap={this.handletest} something wrong?