@os-design/use-forwarded-ref
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -7,8 +7,5 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _react = require("react"); | ||
var assignRef = function assignRef(ref, instance) { | ||
if (!ref) return; | ||
if (typeof ref === 'function') { | ||
@@ -18,3 +15,2 @@ ref(instance); | ||
} | ||
try { | ||
@@ -27,3 +23,2 @@ // eslint-disable-next-line no-param-reassign | ||
}; | ||
var useForwardedRef = function useForwardedRef(ref) { | ||
@@ -37,5 +32,4 @@ var innerRef = (0, _react.useRef)(null); | ||
}; | ||
var _default = useForwardedRef; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=index.js.map |
import { useCallback, useRef } from 'react'; | ||
const assignRef = (ref, instance) => { | ||
if (!ref) return; | ||
if (typeof ref === 'function') { | ||
@@ -10,3 +8,2 @@ ref(instance); | ||
} | ||
try { | ||
@@ -19,3 +16,2 @@ // eslint-disable-next-line no-param-reassign | ||
}; | ||
const useForwardedRef = ref => { | ||
@@ -29,4 +25,3 @@ const innerRef = useRef(null); | ||
}; | ||
export default useForwardedRef; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@os-design/use-forwarded-ref", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"license": "UNLICENSED", | ||
@@ -34,3 +34,3 @@ "repository": "git@gitlab.com:os-team/libs/os-design.git", | ||
}, | ||
"gitHead": "174987fc6c9d55db201be10abde3a4cf5a790573" | ||
"gitHead": "8cb28f6719d699c014fbce91d832a9ff06abe515" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
7321