Difficulty: 6/10react-router, declarative routing, navigation stateRoutes are configured by rendering <Routes> and <Route> that couple URL segments to UI elements.javascriptCopyScenario Questions0-2 years experience1How would you set up a basic declarative router in a new React app using React Router v6?2What happens if you place a <Route> component outside of a <Routes> wrapper?3If you need to navigate to a different page after a button click, how can you keep the router declarative while still triggering the navigation?Follow-up QuestionsHow would you test that your declarative routes behave as expected?What performance metrics would you monitor after deploying the router?If a route needs to be pre‑loaded based on a user role, how would you integrate that?Suggest Improvement