Comparing version 1.3.0 to 1.4.0
12
index.js
@@ -58,3 +58,3 @@ 'use strict'; | ||
var connect = exports.connect = function connect(query, isLive) { | ||
var connect = exports.connect = function connect(query, shouldWait, isLive) { | ||
return function (Consumer) { | ||
@@ -104,3 +104,3 @@ var version = nextVersion++; | ||
value: function render() { | ||
return _react2.default.createElement(Consumer, _extends({}, this.state.results, this.props, { horizon: this.context.horizon })); | ||
return shouldWait && !this.state.results ? null : _react2.default.createElement(Consumer, _extends({}, this.state.results, this.props, { horizon: this.context.horizon })); | ||
} | ||
@@ -145,4 +145,10 @@ }]); | ||
connect.live = function (query) { | ||
return connect(query, true); | ||
return connect(query, false, true); | ||
}; | ||
connect.await = function (query) { | ||
return connect(query, true, false); | ||
}; | ||
connect.liveAwait = function (query) { | ||
return connect(query, true, true); | ||
}; | ||
{ | ||
"name": "hzql", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Easy querying for Horizon and React", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
9396
116