вернуть компонент от React Hook

 const Modal = useMemo(() => {
      return ({ children }) => getOpenModal && (
      <Modal
        isOpen={getOpenModal}
Yellowed Yacare