2018 年还需要 react-tap-event-plugin 吗? [英] Is react-tap-event-plugin still needed in 2018?

查看:52
本文介绍了2018 年还需要 react-tap-event-plugin 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

https://github.com/zilverline/react-tap-event-插件 现在还需要吗?或者直接在 React 的源码中实现了,tap 延迟消失了.

Is https://github.com/zilverline/react-tap-event-plugin still needed nowadays? Or it has been implemented into React's source directly and tap delay is gone.

推荐答案

您可以在自己的链接中找到答案.

You have the answer inside your own link.

Developers.google.com

要消除 300-350 毫秒的点击延迟,您只需要在页面中添加以下内容:

To remove the 300-350ms tap delay, all you need is the following in the of your page:

<meta name="viewport" content="width=device-width">

不推荐使用该插件,因为新版本的 React 删除了该插件所依赖的许多内部组件.

The usage of the plugin is deprecated because new versions of React removes a lot of internals this plugin depends on.

由于现在大多数浏览器中的问题都已得到解决,因此您应该远离此插件.

Since the problem has been fixed in most browsers by now you should migrate away from this plugin.

这篇关于2018 年还需要 react-tap-event-plugin 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆