message: wrap everything in useCallback
diff: @@ -40,7 +40,8 @@ function useDialog({modalRef, isOpen, onDismiss, initialFocusRef, closeButtonRef
  }
  }, [isOpen, initialFocusRef, closeButtonRef, returnFocusRef])
  - const getFocusableItem = (e, movement) => {
  + const getFocusableItem = useCallback(
  + (e, movement) => {
  if (modalRef && modalRef.current) {
  const items = Array.from(modalRef.current.querySelectorAll('*')).filter(focusable)
  if (items.length === 0) return
  @@ -52,16 +53,19 @@ function useDialog({modalRef, isOpen, onDismiss, initialFocusRef, closeButtonRef
  const fallbackIndex = movement === 1 ? 0 : items.length - 1
  return items[offsetIndex] || items[fallbackIndex]
  }
  - }
  -
  -
  + },
  + [modalRef]
  + )
  - const handleTab = (e) => {
  + const handleTab = useCallback(
  + (e) => {
  const movement = e.shiftKey ? -1 : 1
  getFocusableItem(e, movement).focus()
  - }
  + },
  + [getFocusableItem]
  + )
  - const onKeyDown = (event) => {
  + const onKeyDown = useCallback((event) => {
  switch (event.key) {
  case 'Tab':
  handleTab(event)
  @@ -74,7 +78,7 @@ function useDialog({modalRef, isOpen, onDismiss, initialFocusRef, closeButtonRef
  event.stopPropagation()
  break
  }
  - }
  + }, [handleTab, onDismiss, returnFocusRef])
  const getDialogProps = () => {
  return {onKeyDown}
  