Obtener estado en React-Router-DOM V6

import { useLocation } from 'react-router-dom';

const location = useLocation()

const { state } = location.state
Blue Baboon