[Solved] export ‘Switch’ (imported as ‘Switch’) was not found in ‘react-router-dom’
In react-router-dom
v6, Switch
is replaced by routes Routes
.
You need to update the import from:
|
|
to:
|
|
You also need to update the Route declaration from:
|
|
to:
|
|