zilverline / react-tap-event-plugin

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

onTouchTap is not working when React component is embedded within angular app #75

Open rdkrish opened 8 years ago

rdkrish commented 8 years ago

We are in a transition phase trying to move few modules of our angular app to react components. We are using ngReact library to embed React components into existing angular app.

If I render the independent React component in a browser, onTouchTap events work perfectly! But the same component, if I embed in the angular app, component rendering is fine, but events are not getting fired.

Any help would be deeply appreciated!

Thanks in advance!

madjam002 commented 8 years ago

I have never used ngReact, but I imagine it's something to do with how it wraps the React component in an Angular directive (or whatever it is).

Can you post your angular code which is rendering the React element?

Also try making sure that you're calling injectTapEventPlugin and you don't have two copies of React on the page or two different versions.

rdkrish commented 8 years ago

@madjam002 Thanks for the quick reply.

I have made sure that injectTapEventPlugin is called only once. As you said, I may have to look at how the ngReact module wraps the React component.

maddrag0n commented 6 years ago

@rdkrish I am using it with ngReact without issues.