You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
InternshipProject/node_modules/antd/es/typography/hooks/useUpdatedEffect.js

13 lines
333 B

import * as React from 'react';
/** Similar with `useEffect` but only trigger after mounted */
export default (function (callback, conditions) {
var mountRef = React.useRef(false);
React.useEffect(function () {
if (mountRef.current) {
callback();
} else {
mountRef.current = true;
}
}, conditions);
});