Update block codes at "Let's form the routes" section, which allows us to see and use actual version and state of react-router-dom library.
Remark:
Starting from v6 version, react-router-dom marked Switch and Redirect (that placed inside of Switch) as deprecated components. As a recomendation Switch should be replaced by Routes, and Redirect by Navigate.
Background
Update block codes at "Let's form the routes" section, which allows us to see and use actual version and state of
react-router-dom
library.Remark:
Starting from v6 version,
react-router-dom
markedSwitch
andRedirect
(that placed inside ofSwitch
) as deprecated components. As a recomendationSwitch
should be replaced byRoutes
, andRedirect
byNavigate
.Related links from
react-router-dom
documentation:<Switch>
elements to<Routes>
<Route element>
<Redirect>
s inside<Switch>