message: feat: usePersistFn avoid calling useCallback
diff: -import { useCallback, useRef } from 'react';
  +import { useRef } from 'react';
  export type noop = (...args: any[]) => any;
  function usePersistFn<T extends noop>(fn: T) {
  - const ref = useRef<any>(() => {
  - throw new Error('Cannot call function while rendering.');
  - });
  + const fnRef = useRef<T>();
  + fnRef.current = fn;
  - ref.current = fn;
  -
  - const persistFn = useCallback(((...args) => ref.current(...args)) as T, [ref]);
  + const persistFn = useRef<T>();
  + if (!persistFn.current) {
  + persistFn.current = function (...args) {
  + return fnRef.current!.apply(this, args);
  + } as T;
  + }
  - return persistFn;
  + return persistFn.current!;
  }
  export default usePersistFn;
  