Skip to content

Commit dca9d97

Browse files
committed
bump version 0.5.1
1 parent ec06935 commit dca9d97

File tree

4 files changed

+1313
-1581
lines changed

4 files changed

+1313
-1581
lines changed

dist/index.esm.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@ var MAGIC_EFFECTS = Symbol["for"]('magicEffects');
5454
var MAGIC_MEMOS = Symbol["for"]('magicMemos');
5555
var MAGIC_REFS = Symbol["for"]('magicRefs');
5656
var MAGIC_STACKS = Symbol["for"]('magicStacks');
57-
var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // React 15.3.2 support + Polyfill
57+
var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
58+
var isReact15 = React.version.indexOf('15') === 0; // React 15.3.2 support + Polyfill
5859

59-
var instanceKey = React.version.indexOf('16') === 0 ? 'stateNode' : '_instance';
60+
var instanceKey = isReact15 ? '_instance' : 'stateNode';
6061

61-
if (React.version.indexOf('15') === 0) {
62+
if (isReact15) {
6263
invariant(ReactInternals, 'Please for React ^15.3.2 - 15.6.2 import "react-class-hooks/poly15" in your root index.js!');
6364
}
6465

dist/index.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
Object.defineProperty(exports, '__esModule', { value: true });
44

5-
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
5+
var React = require('react');
66

7-
var React = _interopDefault(require('react'));
7+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8+
9+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
810

911
function _typeof(obj) {
1012
"@babel/helpers - typeof";
@@ -49,9 +51,9 @@ function invariant(condition, message) {
4951
throw new Error(prefix + ": " + (message || ''));
5052
}
5153

52-
React.PureComponent.prototype.componentDidMount = function () {};
54+
React__default['default'].PureComponent.prototype.componentDidMount = function () {};
5355

54-
React.Component.prototype.componentDidMount = function () {};
56+
React__default['default'].Component.prototype.componentDidMount = function () {};
5557

5658
invariant(typeof Symbol === 'function' && Symbol["for"], 'react-class-hooks needs Symbols!'); // Separate objects for better debugging.
5759

@@ -60,11 +62,12 @@ var MAGIC_EFFECTS = Symbol["for"]('magicEffects');
6062
var MAGIC_MEMOS = Symbol["for"]('magicMemos');
6163
var MAGIC_REFS = Symbol["for"]('magicRefs');
6264
var MAGIC_STACKS = Symbol["for"]('magicStacks');
63-
var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // React 15.3.2 support + Polyfill
65+
var ReactInternals = React__default['default'].__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
66+
var isReact15 = React__default['default'].version.indexOf('15') === 0; // React 15.3.2 support + Polyfill
6467

65-
var instanceKey = React.version.indexOf('16') === 0 ? 'stateNode' : '_instance';
68+
var instanceKey = isReact15 ? '_instance' : 'stateNode';
6669

67-
if (React.version.indexOf('15') === 0) {
70+
if (isReact15) {
6871
invariant(ReactInternals, 'Please for React ^15.3.2 - 15.6.2 import "react-class-hooks/poly15" in your root index.js!');
6972
}
7073

0 commit comments

Comments
 (0)