Skip to content

Commit

Permalink
bump version 0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
salvoravida committed Dec 1, 2020
1 parent ec06935 commit dca9d97
Show file tree
Hide file tree
Showing 4 changed files with 1,313 additions and 1,581 deletions.
7 changes: 4 additions & 3 deletions dist/index.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ var MAGIC_EFFECTS = Symbol["for"]('magicEffects');
var MAGIC_MEMOS = Symbol["for"]('magicMemos');
var MAGIC_REFS = Symbol["for"]('magicRefs');
var MAGIC_STACKS = Symbol["for"]('magicStacks');
var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // React 15.3.2 support + Polyfill
var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
var isReact15 = React.version.indexOf('15') === 0; // React 15.3.2 support + Polyfill

var instanceKey = React.version.indexOf('16') === 0 ? 'stateNode' : '_instance';
var instanceKey = isReact15 ? '_instance' : 'stateNode';

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

Expand Down
17 changes: 10 additions & 7 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

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

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

var React = _interopDefault(require('react'));
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

function _typeof(obj) {
"@babel/helpers - typeof";
Expand Down Expand Up @@ -49,9 +51,9 @@ function invariant(condition, message) {
throw new Error(prefix + ": " + (message || ''));
}

React.PureComponent.prototype.componentDidMount = function () {};
React__default['default'].PureComponent.prototype.componentDidMount = function () {};

React.Component.prototype.componentDidMount = function () {};
React__default['default'].Component.prototype.componentDidMount = function () {};

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

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

var instanceKey = React.version.indexOf('16') === 0 ? 'stateNode' : '_instance';
var instanceKey = isReact15 ? '_instance' : 'stateNode';

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

Expand Down
Loading

0 comments on commit dca9d97

Please sign in to comment.