I need help to fix this error with the best way I don't want to recall component inside withRouter with props
import { useNavigate } from 'react-router-dom'
import { Outlet } from 'react-router-dom'
class App {
componentDidMount(): void {
const navigate = useNavigate()
navigate('/phone')
}
render(): React.ReactNode {
return (
<div className='App'>
<Outlet />
</div>
)
}
}
export default App
I try to navigate between two class components and I want to use animaiton between two classes via navigation
I search on the best to solve this error