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.

Reload component on click but path unchanged

See original GitHub issue

Hi, I’m trying to make my page component reload when the user clicks in the navbar on the link to that same page (the /path does not change). It seems that Routify just ignores the navigation event and nothing really happens.

I’ve tried to force a “reload” via on:click="{$goto('/example')}" but that didn’t seem to do the trick.

I can work around it by letting the browser fetch the page the normal way via target=“_self” but that is ugly because there’s a visual impact.

Any ideas how I can reload the page component?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
jakobrosenbergcommented, Mar 2, 2021

I’m looking into the options available for implementing this. I’ll keep you posted if I crack it.

1reaction
jakobrosenbergcommented, Mar 3, 2021

@mizzao, you’re correct. I’ve released a patch to fix nollup compatibility.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Switch Route doesn't work on click until refresh page manually
When I click on "go to cart" my URL changes but there is no change on visual.. When I refresh browser page, it...
Read more >
Basic Features: Fast Refresh - Next.js
Next.js' Fast Refresh is a new hot reloading experience that gives you instantaneous feedback on edits made to your React components.
Read more >
5 Ways to Avoid React Component Re-Renderings
In the above example, useCallBack() memoizes the onClick callback. So, it will not re-render the component if the user clicks the same item...
Read more >
Angular: Reload/Refresh a Component or Entire Application ...
First I click on Reload Current Route button. As you can see in the console, navigation has succeeded but the AppComponent has not...
Read more >
React route refresh without page reload - DEV Community ‍ ‍
But because the app's router was mounted into a nested route, doing history.push('/') un-mounts the entire react app loaded there. This means ...
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