react-native-gesture-handler icon indicating copy to clipboard operation
react-native-gesture-handler copied to clipboard

Remove hammer.js

Open EvanBacon opened this issue 4 years ago • 4 comments

Hammer.js introduces a lot of extra code bloat, doesn't support SSR, and the repo is now pretty unmaintained. Opening this issue to mark that we do plan on replacing it eventually.

It might even make sense to migrate a few recognizers at a time.

Related issues #786 #883 #800

EvanBacon avatar Dec 31 '19 22:12 EvanBacon

whats gonna be hammerjs's replacement?

vamshi9666 avatar Jan 06 '20 04:01 vamshi9666

Perhaps we could replace it with @egjs/hammerjs, which is pretty much a drop-in replacement that supports SSR and that is maintained?

infostreams avatar Jan 27 '20 09:01 infostreams

Hi @EvanBacon , I see this was already done in https://github.com/software-mansion/react-native-gesture-handler/commit/e4de5d9156fba4f60a8b8c435677c552806f8a25#diff-b9cfc7f2cdf78a7f4b91a753d10865a2

But can I ask that you avoid the github source dependency please, this breaks our build because our docker build does not have git, as a security precaution. At the very least you should use a specific tag, so you're not just installing "latest" at build time, but really this is the only package we have that has a git dependency, so it only started breaking this week. It's been a hell of a time tracking this down, as yarn wouldn't tell me what it was trying to do, only that it couldn't find git.

For the meantime I'm having to keep our version down until it's fixed.

Thanks!

joelbyrnes avatar Feb 04 '20 02:02 joelbyrnes

Version 2.6.0 introduces new web implementation, however Hammer.js is still enabled by default. To use new implementation call enableExperimentalWebImplementation() in the root of the project.

Current version 2.6.1 should fix most of the issues related to Hammer.js

m-bert avatar Sep 21 '22 11:09 m-bert