@shopify/react-async
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -16,2 +16,6 @@ "use strict"; | ||
_this.mounted = true; | ||
_this.loadIfIntersecting = function (_a) { | ||
var _b = _a.isIntersecting, isIntersecting = _b === void 0 ? true : _b; | ||
return isIntersecting ? _this.load() : Promise.resolve(); | ||
}; | ||
_this.load = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
@@ -67,3 +71,3 @@ var resolved, error_1; | ||
var content = loading ? renderLoading() : render(resolved); | ||
var intersectionObserver = loading && defer === async_1.DeferTiming.InViewport ? (React.createElement(react_intersection_observer_1.IntersectionObserver, { threshold: 0, unsupportedBehavior: react_intersection_observer_1.UnsupportedBehavior.TreatAsIntersecting, onIntersecting: this.load })) : null; | ||
var intersectionObserver = loading && defer === async_1.DeferTiming.InViewport ? (React.createElement(react_intersection_observer_1.IntersectionObserver, { threshold: 0, unsupportedBehavior: react_intersection_observer_1.UnsupportedBehavior.TreatAsIntersecting, onIntersectionChange: this.loadIfIntersecting })) : null; | ||
return (React.createElement(React.Fragment, null, | ||
@@ -70,0 +74,0 @@ effect, |
{ | ||
"name": "@shopify/react-async", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"license": "MIT", | ||
@@ -30,3 +30,3 @@ "description": "Tools for creating powerful, asynchronously-loaded React components.", | ||
"@shopify/react-effect": "^3.0.0", | ||
"@shopify/react-intersection-observer": "^1.0.1", | ||
"@shopify/react-intersection-observer": "^2.0.0", | ||
"@shopify/useful-types": "^1.2.1" | ||
@@ -33,0 +33,0 @@ }, |
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
42742
631
+ Added@shopify/react-intersection-observer@2.1.4(transitive)
- Removed@shopify/react-intersection-observer@1.0.1(transitive)