@shopify/react-async
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -10,2 +10,8 @@ # Changelog | ||
## [2.3.0] - 2019-05-22 | ||
### Added | ||
- Prefetching now happens on `touchdown` to improve perceived performance on touch devices ([#708](https://github.com/Shopify/quilt/pull/708)) | ||
## [2.2.0] - 2019-05-15 | ||
@@ -12,0 +18,0 @@ |
@@ -14,3 +14,3 @@ "use strict"; | ||
_this.prefetchAgressively = shouldPrefetchAggressively(); | ||
_this.handleMouseDown = function (_a) { | ||
_this.handlePressStart = function (_a) { | ||
var target = _a.target; | ||
@@ -26,3 +26,3 @@ _this.clearTimeout(); | ||
}; | ||
_this.handleMouseLeave = function (_a) { | ||
_this.handlePointerLeave = function (_a) { | ||
var target = _a.target, relatedTarget = _a.relatedTarget; | ||
@@ -51,3 +51,3 @@ var url = _this.state.url; | ||
}; | ||
_this.handleMouseOver = function (_a) { | ||
_this.handlePointerEnter = function (_a) { | ||
var target = _a.target; | ||
@@ -87,8 +87,9 @@ if (target == null) { | ||
var expensiveListeners = this.prefetchAgressively ? (React.createElement(React.Fragment, null, | ||
React.createElement(EventListener_1.EventListener, { passive: true, event: "mouseover", handler: this.handleMouseOver }), | ||
React.createElement(EventListener_1.EventListener, { passive: true, event: "focusin", handler: this.handleMouseOver }), | ||
React.createElement(EventListener_1.EventListener, { passive: true, event: "mouseout", handler: this.handleMouseLeave }), | ||
React.createElement(EventListener_1.EventListener, { passive: true, event: "focusout", handler: this.handleMouseLeave }))) : null; | ||
React.createElement(EventListener_1.EventListener, { passive: true, event: "mouseover", handler: this.handlePointerEnter }), | ||
React.createElement(EventListener_1.EventListener, { passive: true, event: "focusin", handler: this.handlePointerEnter }), | ||
React.createElement(EventListener_1.EventListener, { passive: true, event: "mouseout", handler: this.handlePointerLeave }), | ||
React.createElement(EventListener_1.EventListener, { passive: true, event: "focusout", handler: this.handlePointerLeave }))) : null; | ||
return (React.createElement(React.Fragment, null, | ||
React.createElement(EventListener_1.EventListener, { passive: true, event: "mousedown", handler: this.handleMouseDown }), | ||
React.createElement(EventListener_1.EventListener, { passive: true, event: "mousedown", handler: this.handlePressStart }), | ||
React.createElement(EventListener_1.EventListener, { passive: true, event: "touchstart", handler: this.handlePressStart }), | ||
expensiveListeners, | ||
@@ -95,0 +96,0 @@ preloadMarkup)); |
{ | ||
"name": "@shopify/react-async", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Tools for creating powerful, asynchronously-loaded React components.", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45748
684