File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ import * as React from 'react' ;
2+ import getReactElementRef from '../getReactElementRef' ;
3+
4+ /**
5+ * Returns the ref of a React element handling differences between React 19 and older versions.
6+ * It will throw runtime error if the element is not a valid React element.
7+ *
8+ * @param element React.ReactElement
9+ * @returns React.Ref<any> | null
10+ *
11+ * @deprecated Use getReactElementRef instead
12+ */
13+
14+ export default function getReactNodeRef ( element : React . ReactElement ) : React . Ref < any > | null {
15+ return getReactElementRef ( element ) ;
16+ }
Original file line number Diff line number Diff line change 1+ export { default } from './getReactNodeRef' ;
Original file line number Diff line number Diff line change @@ -45,5 +45,6 @@ export { default as unstable_useSlotProps } from './useSlotProps';
4545export type { UseSlotPropsParameters , UseSlotPropsResult } from './useSlotProps' ;
4646export { default as unstable_resolveComponentProps } from './resolveComponentProps' ;
4747export { default as unstable_extractEventHandlers } from './extractEventHandlers' ;
48+ export { default as unstable_getReactNodeRef } from './getReactNodeRef' ;
4849export { default as unstable_getReactElementRef } from './getReactElementRef' ;
4950export * from './types' ;
You can’t perform that action at this time.
0 commit comments