createCallbackRef = (ref) => useCallback((callback) => {
  if (!ref.current || callback !== ref.current) {
    // eslint-disable-next-line no-param-reassign
    ref.current = callback;
  }
}, [ref.current])
Create a persistent callback reference that will live trough a component lifecycle
@param ref
@returns {Function}