Next.js Discord

Discord Forum

AppRouter: router.refresh() + router.push() simultaneously

Unanswered
Selkirk Rex posted this in #help-forum
Open in Discord
Selkirk RexOP
Hi *,

I have a scenario where I want to navigate to another page but also want to perform a refresh (to get the header of the page being updated) at the same time.

Each one works on its own, but when doing both the router.refresh has no effect.

Any ideas? 🙂

2 Replies

Selkirk RexOP
Hey, thank you for your reply :). Actually, it's working the other way around!

(Did not try this before, because my current implementation basically does not allow this, because router.refresh is being called by another component)