In our project we only need to use react-fastclick in some cases. Unfortunately, due to how it's initialized, this is is not possible.
When importing using import 'react-fastclick' the library gets initialized immediately, and since ES6 import statement cannot live inside an if clause we cannot use it conditionally.
What would be great is if we'd have a way to (1) import it; (2) initialize it.
Hi,
In our project we only need to use react-fastclick in some cases. Unfortunately, due to how it's initialized, this is is not possible.
When importing using
import 'react-fastclick'
the library gets initialized immediately, and since ES6 import statement cannot live inside an if clause we cannot use it conditionally.What would be great is if we'd have a way to (1) import it; (2) initialize it.
I'll try making a PR for this.