import { useCallback, useRef } from 'react';
export const useStaticCallback = callback => {
  const callbackRef = useRef(callback);
  callbackRef.current = callback;
  return useCallback((...args) => callbackRef.current(...args), []);
};