How to set initial router route?
See original GitHub issueI want to be able to change the current vue-router route by pushing a new path, but I don’t seem to get access to the router with the render()
function.
How am I supposed to change routes with this library?
EDIT: changed title from “How to change router route?”
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
How to Set React Router Default Route Redirect to /home
In this guide, you will learn how to get started with routing and redirect the default route to /home . Routing Configuration. To...
Read more >Set a Default route with redirect using React Router | bobbyhadz
Use the Navigate element to set a default route with redirect in React Router, e.g. <Route path="/" element={<Navigate to="/dashboard" />} /> .
Read more >How to set the DefaultRoute to another Route in React Router
The right way to create a default route (that is not the index route) is to use <IndexRedirect/> : <IndexRedirect to="/default-path" ...
Read more >How to set the default route in ReactJS? - DEV Community
To handle the default routing now, we can use two methods, one of them will be “*“, like routing, and the second one...
Read more >How to configure Default Routing on Cisco Routers?
Enter global configuration mode. device# configure terminal. · Enter 0.0. 0.0 0.0. · (Optional) Enable the default network route for static route next-hop ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I suppose that’s possible but I went for a middle path between dogmatism and pragmatism. This lets people control the initial setup then test against the DOM. If they want to start accessing the router directly then they’re free to miss the point of such testing 😆
@dfcook thanks, that’s great! But are you not worried that now one can have access to the router at any time by saving it to an outer variable from the init callback? I said the examples I said, because in those ways you would not have to expose the router.