AlloyTeam/AlloyFinger

AlloyFinger在react 16.2.0出现Warning

Opened this issue · 3 comments

Warning: This synthetic event is reused for performance reasons. If you're seeing this, you're adding a new property in the synthetic event object. The property is never released. See https://fb.me/react-event-pooling for more information.

这个Warning解决了吗,还是用了一个新的库 兄弟

在_handleTouchStart,_handleTouchMove,_hadnleTouchEnd 方法里加上 evt.persist();

这个库里面一些事件会异步触发,此时react会回收evt对象,如果访问evt就会出现warning,建议调用event.persist()