import React from'react';
/**
* Hook used to "cache" the "previous" value of a prop or a computed variable.
*/export function usePrevious(value) {
constref = React.useRef();
React.useEffect(() => {
ref.current = value;
}, [value]);
returnref.current;
}