react-native-sortables
Version:
Powerful Sortable Components for Flexible Content Reordering in React Native
19 lines (17 loc) • 482 B
JavaScript
;
import { forwardRef } from 'react';
import { IS_REACT_19 } from '../constants';
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export const componentWithRef = render => {
if (IS_REACT_19) {
return ({
ref,
...props
}) => render(props, ref);
}
return /*#__PURE__*/forwardRef(render);
};
export const getContextProvider = Context => {
return IS_REACT_19 ? Context : Context.Provider;
};
//# sourceMappingURL=react.js.map