Docs: update block codes at "Let's form the routes" section #608
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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>