Skip to content

Warning: This synthetic event is reused for performance reasons. #75

@HriBB

Description

@HriBB

Hey

I'm seeing this warning on "mobile", via chrome developer tools.

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.

In handleTouchEvents you're adding clientX and clientY to the event object, which I guess is bad in React.

itemDown: function (item, index, event) {
  this.handleTouchEvents(event);
  ...
}

handleTouchEvents: function (event) {
  if (event.touches && event.touches.length) {
    event.clientX = event.touches[0].clientX;
    event.clientY = event.touches[0].clientY;
  }
},

Maybe you can include that in the rewrite? Otherwise I can take a look and make a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions