fullpage-scroll-component
Version:
Stepped Scroll Component Library.
19 lines (14 loc) • 366 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var react = require('react');
const useDidUpdate = (callback, deps) => {
const mounted = react.useRef(false);
react.useEffect(() => {
if (!mounted.current) {
mounted.current = true;
} else {
callback();
}
}, deps);
};
exports.useDidUpdate = useDidUpdate;