message: use useEffect for usePrevious hook
diff: -import { useMemo } from 'react';
  +import { useEffect, useRef } from 'react';
  -export const usePrevious = <P = any>(value: P, deps: any[] = []): P =>
  +export const usePrevious = <P = any>(value: P, deps: any[] = []): P => {
  + const ref = useRef<P>();
  + useEffect(() => {
  + ref.current = value;
  // eslint-disable-next-line react-hooks/exhaustive-deps
  - useMemo(() => value, deps);
  + }, [value, ...deps]);
  + return ref.current;
  +};
  