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.
1 parent 99d8344 commit b26f068Copy full SHA for b26f068
src/ref.ts
@@ -1,5 +1,5 @@
1
import type * as React from 'react';
2
-import { isValidElement } from 'react';
+import { isValidElement, version } from 'react';
3
import { ForwardRef, isMemo } from 'react-is';
4
import useMemo from './hooks/useMemo';
5
import isFragment from './React/isFragment';
@@ -45,7 +45,7 @@ export const supportRef = (nodeOrComponent: any): boolean => {
45
// React 19 no need `forwardRef` anymore. So just pass if is a React element.
46
if (
47
isReactElement(nodeOrComponent) &&
48
- React.version.startsWith('19.')
+ version.startsWith('19.')
49
) {
50
return true;
51
}
0 commit comments