I'm a Software Engineer with 1 year of experience specializing in .NET Core and Javascript. As a graduate of Faculty of Information Technology, University of Moratuwa, Sri Lanka I consider myself as a
Hey, Nice tutorial. Btw, I have a question. I've seen in many articles, there the Routes are inside a Switch . But in your tutorial you haven't used Switch. Why do we should use / shouldn't use Switch ?
A switch is used to switch between routes whenever the exact path is matching /while handling the 404 requests we need to wrap all our Routes with the Switch Component.
Hey, Nice tutorial. Btw, I have a question. I've seen in many articles, there the
Route
s are inside aSwitch
. But in your tutorial you haven't used Switch. Why do we should use / shouldn't use Switch ?A switch is used to switch between routes whenever the exact path is matching /while handling the 404 requests we need to wrap all our Routes with the Switch Component.
Refer Play with React Router Part-2