We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents af1dc99 + 420ee3f commit ec06935Copy full SHA for ec06935
src/core/magicSelf.js
@@ -20,10 +20,12 @@ export const MAGIC_STACKS = Symbol.for('magicStacks');
20
21
const ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
22
23
+const isReact15 = React.version.indexOf('15') === 0
24
+
25
// React 15.3.2 support + Polyfill
-const instanceKey = React.version.indexOf('16') === 0 ? 'stateNode' : '_instance';
26
+const instanceKey = isReact15 ? '_instance' : 'stateNode';
27
-if (React.version.indexOf('15') === 0) {
28
+if (isReact15) {
29
invariant(
30
ReactInternals,
31
'Please for React ^15.3.2 - 15.6.2 import "react-class-hooks/poly15" in your root index.js!'
0 commit comments