UNPKG

@pdftron/webviewer-react-toolkit

Version:

A React component library for integrating with PDFTron WebViewer API.

13 lines (12 loc) 355 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.useCurrentRef = void 0; var react_1 = require("react"); function useCurrentRef(toRef) { var toRefRef = react_1.useRef(toRef); react_1.useEffect(function () { toRefRef.current = toRef; }); return toRefRef; } exports.useCurrentRef = useCurrentRef;