I saw this in a tutorial
In the Navigation Component
<li><NavLink to='/'>Home</NavLink></li>
In another Component
import Navigation from './Headers/Navigation'
import Home from './Body/Home'
<Navigation />
<Switch>
<Route path='/' exact component={Home} />
<Redirect from ='/' to='/Home'/>
<Switch />
I tried to learned the latest update and tried the above code by :
<Routes>
<Route path='/' element={<Navigate to='/Home' />} />
<Routes>
But what I really want doesn't work