1

So I need this library for the deprecated onTouchTap for Material UI. Apparently I can only run this "injectTapEventPlugin()" one time in the whole span of the application so I put it in the constructor in my APP.js file. However, it still ended up calling it twice.

Anybody with more React experience: where is the optimal placement for this function and import statement?

AceGravity
  • 333
  • 2
  • 6
  • 13

1 Answers1

1

You can check out how the material-ui docs site does it here:

https://github.com/callemall/material-ui/blob/master/docs/src/app/app.js#L14

We put it in the same file that renders the app into the DOM.

Hai Nguyen
  • 4,059
  • 1
  • 20
  • 16