create-subscription
Advanced tools
Comparing version 0.0.0-experimental-af3d52611 to 0.0.0-experimental-af730436c-20220405
@@ -1,2 +0,3 @@ | ||
/** @license React vundefined | ||
/** | ||
* @license React | ||
* create-subscription.development.js | ||
@@ -14,6 +15,15 @@ * | ||
(function() { | ||
'use strict'; | ||
var React = require('react'); | ||
'use strict'; | ||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ | ||
if ( | ||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && | ||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === | ||
'function' | ||
) { | ||
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); | ||
} | ||
var React = require('react'); | ||
function _inheritsLoose(subClass, superClass) { | ||
@@ -29,7 +39,9 @@ subClass.prototype = Object.create(superClass.prototype); | ||
{ | ||
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { | ||
args[_key2 - 1] = arguments[_key2]; | ||
{ | ||
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { | ||
args[_key2 - 1] = arguments[_key2]; | ||
} | ||
printWarning('error', format, args); | ||
} | ||
printWarning('error', format, args); | ||
} | ||
@@ -48,6 +60,7 @@ } | ||
args = args.concat([stack]); | ||
} | ||
} // eslint-disable-next-line react-internal/safe-string-coercion | ||
var argsWithFormat = args.map(function (item) { | ||
return '' + item; | ||
return String(item); | ||
}); // Careful: RN currently depends on this prefix | ||
@@ -164,6 +177,4 @@ | ||
if (!(typeof unsubscribe === 'function')) { | ||
{ | ||
throw Error( "A subscription must return an unsubscribe function." ); | ||
} | ||
if (typeof unsubscribe !== 'function') { | ||
throw new Error('A subscription must return an unsubscribe function.'); | ||
} // It's safe to store unsubscribe on the instance because | ||
@@ -201,3 +212,12 @@ // We only read or write that property during the "commit" phase. | ||
exports.createSubscription = createSubscription; | ||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ | ||
if ( | ||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && | ||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === | ||
'function' | ||
) { | ||
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); | ||
} | ||
})(); | ||
} |
@@ -1,2 +0,3 @@ | ||
/** @license React vundefined | ||
/** | ||
* @license React | ||
* create-subscription.production.min.js | ||
@@ -3,0 +4,0 @@ * |
{ | ||
"name": "create-subscription", | ||
"description": "utility for subscribing to external data sources inside React components", | ||
"version": "0.0.0-experimental-af3d52611", | ||
"version": "0.0.0-experimental-af730436c-20220405", | ||
"repository": { | ||
@@ -13,3 +13,2 @@ "type": "git", | ||
"README.md", | ||
"build-info.json", | ||
"index.js", | ||
@@ -19,3 +18,3 @@ "cjs/" | ||
"peerDependencies": { | ||
"react": "0.0.0-experimental-af3d52611" | ||
"react": "0.0.0-experimental-af730436c-20220405" | ||
}, | ||
@@ -22,0 +21,0 @@ "devDependencies": { |
@@ -11,3 +11,3 @@ # create-subscription | ||
* Redux/Flux stores should use the [context API](https://reactjs.org/docs/context.html) instead. | ||
* I/O subscriptions (e.g. notifications) that update infrequently should use [`react-cache`](https://github.com/facebook/react/blob/master/packages/react-cache/README.md) instead. | ||
* I/O subscriptions (e.g. notifications) that update infrequently should use [`react-cache`](https://github.com/facebook/react/blob/main/packages/react-cache/README.md) instead. | ||
* Complex libraries like Relay/Apollo should manage subscriptions manually with the same techniques which this library uses under the hood (as referenced [here](https://gist.github.com/bvaughn/d569177d70b50b58bff69c3c4a5353f3)) in a way that is most optimized for their library usage. | ||
@@ -14,0 +14,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
18351
192