question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to set initial router route?

See original GitHub issue

I 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:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
dfcookcommented, Mar 25, 2019

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 😆

0reactions
amcsicommented, Mar 25, 2019

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found