Questions
The following questions will cement your knowledge of what you have just learned about in this chapter:
- We have the following routes defined:
<BrowserRouter> Â Â <Routes> Â Â Â Â <Route path="search" element={<SearchPage/>} /> Â Â Â Â <Route path="" element={<HomePage/>} /> Â Â </Routes> </BrowserRouter>
Answer the following questions:
- What component(s) will be rendered when the
/
location is entered in the browser? - What about when the
/search
location is entered in the browser?
- What component(s) will be rendered when the
- In our Q&A app, we want a
/login
path to navigate to the sign-in page, as well as the/signin
path. How can we implement this? - We have the following routes defined:
<BrowserRouter> Â Â <Routes> Â Â Â Â <Route path="search" element={<SearchPage/>} /> Â Â Â Â <Route path="" element ={...