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.

Is there a way to run reload?

See original GitHub issue

@krasimir Hi,

Thanks for the nice lib.

Is it possible to run reload for router to re call routing logic. Example:

router.navigate('/users'); # -> API.getUsers() called, ui rendered with users
API.deleteUser(123); # User clicks a button, some API method called
router.reload(); # -> to back to the step 1 above and then update ui

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
PedroIssaGitcommented, Jul 12, 2020

Sorry i really don’t understand why not implement a router.reload() function, ? Congratulations this is amazing project.

2reactions
killmenotcommented, Feb 26, 2018

The only way I found that allows me to do a reload is the following:

const currentUrl = router._lastRouteResolved.url
router._lastRouteResolved = null;
router.navigate(currentUrl);

But this solution has issues with leave logic

Read more comments on GitHub >

github_iconTop Results From Across the Web

Auto reloading python Flask app upon code changes
Run the flask run CLI command with debug mode enabled, which will automatically enable the reloader. As of Flask 2.2, you can pass...
Read more >
Write and debug code by using Hot Reload - Visual Studio ...
Start the app with the debugger attached using either F5 or, if supported for your application, Ctrl+F5. Open a C#, C++, or Visual...
Read more >
Hot reload - Flutter documentation
How to perform a hot reload. To hot reload a Flutter app: Run the app from a supported Flutter editor or a terminal...
Read more >
5 Ways to Live Reloading Go Applications - Tech Inscribed
Air is a command-line utility that provides live reloading for Go applications. Install Air by running the following command.
Read more >
Edit running code with Hot Reload - JetBrains Rider
You can edit the code of a suspended program and then continue debugging without the need to restart the session. The affected project...
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