@geezee/react-ui
Version:
Modern and minimalist React UI library.
17 lines (15 loc) • 523 B
JavaScript
import { useRef } from 'react';
export default function useImperative() {
var ref = useRef(null);
return {
getCurrentTab: function getCurrentTab() {
var _ref$current;
return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.getCurrentTab();
},
setCurrentTab: function setCurrentTab(v) {
var _ref$current2;
(_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.setCurrentTab(v);
},
ref: ref
};
}