kitze / react-long

A LongPress component for React
86 stars 9 forks source link

Don't log an error if touch is not supported #2

Closed flash1293 closed 6 years ago

flash1293 commented 6 years ago

First of all, awesome library, exactly what I was looking for :)

It would be awesome if you would consider not logging an error if touch is not supported but instead just failing silently. Real-world apps are executed on a wide range of devices (with and without touch support) and the case that touch is not supported is very much expected and not really an "error" of the application.

I'm aware of the possibility of doing the feature-detection myself and only using react-long if touch-support is there, but since in almost all usage scenarios just not doing anything at all if touch isn't available is the desirable behavior, the library could and should take care of this.

Personally I think the warning on top of the readme is enough information at this point.

kitze commented 6 years ago

Makes sense.