React Router Nested Routes Quiz

Test your knowledge of nested routes in React Router, including Outlet, layout routes, index routes, relative paths, and child route rendering.

20 questions · free · answers explained

Start the quiz

All questions in this quiz

  1. What are nested routes in React Router?
  2. Which component renders the matching child route inside a parent route?
  3. What happens if a parent route does not render Outlet?
  4. What is a layout route commonly used for?
  5. What does an index route represent in a nested route tree?
  6. Which route is a child path relative to its parent?
  7. What URL can match a child route with path settings under a parent path dashboard?
  8. Where should navigation shared by dashboard child pages usually live?
  9. Which hook reads context passed through Outlet context?
  10. What is the purpose of Outlet context?
  11. How do relative links help nested routes?
  12. What does a path of .. commonly mean in nested navigation?
  13. Why are nested routes useful for dashboards?
  14. Which component replaced the common React Router v5 Switch route selection pattern?
  15. What should child route paths usually omit when they are meant to be nested relative paths?
  16. Can a parent route render its own content and also render child routes?
  17. What happens when no child route matches and there is no index route?
  18. How can nested routes reduce duplication?
  19. Which route structure best represents a settings page inside a dashboard?
  20. What is the biggest practical difference between nested routes and simply rendering tabs with local state?

Prefer to read first? React interview questions with written answers.