UNPKG

404 BJavaScriptView Raw
1import _typeof from "@babel/runtime/helpers/esm/typeof";
2
3/** Checks that the passed object is a valid React ref object. */
4var isRefObject = function isRefObject(ref) {
5 return (// https://github.com/facebook/react/blob/v16.8.2/packages/react-reconciler/src/ReactFiberCommitWork.js#L665
6 ref !== null && _typeof(ref) === 'object' && ref.hasOwnProperty('current')
7 );
8};
9
10export default isRefObject;
\No newline at end of file