FrontPastel/node_modules/@mui/utils/modern/usePreviousProps/usePreviousProps.js

11 lines
229 B
JavaScript

'use client';
import * as React from 'react';
const usePreviousProps = value => {
const ref = React.useRef({});
React.useEffect(() => {
ref.current = value;
});
return ref.current;
};
export default usePreviousProps;