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.

Refreshing homepage doesn't call thunk after initial load

See original GitHub issue

If a user clicks on a Link that points to the current route the thunk is not called. This only happens until the user navigates away from the current route, after that an action with the same type as current route calls the thunk again.

I believe this happens because the location reducer doesn’t update the kind when pathname is the same. The attemptCallRouteThunk function takes the kind from the state (still set to load) and not the action (set to push).

https://github.com/faceyspacey/redux-first-router/blob/master/src/pure-utils/attemptCallRouteThunk.js#L21

https://github.com/faceyspacey/redux-first-router/blob/master/src/reducer/createLocationReducer.js#L20

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
connorsmallmancommented, Sep 13, 2018

@ScriptedAlchemy I’ll try and get this done today, if not me one of my colleagues will.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why doesn't function get called on first page load, only after ...
For some reason function doesn't get called when page loads the first time, only after refreshing the page it gets called. Examples:
Read more >
Incremental Refresh and Hybrid tables in Power BI - RADACAD
Full Load means fetching the entire dataset each time and wiping out the previous data. When I say the entire dataset, I mean...
Read more >
How To Call Web APIs with the useEffect Hook in React
To fix this, start by hiding the alert. In this case, you'd want to hide the information after a brief period, such as...
Read more >
Apple logo with progress bar after updating or restoring ...
If you think the update is stuck, press one of the buttons. If you see an updating message, the update is still in...
Read more >
How to Fix the Refresh Button When Using Service Workers
Call update() on the registration to manually refresh the Service Worker script. The Service Worker script automatically attempts to refresh ...
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