why does nextjs 13 have no equivalent to router.refresh() that rerenders client components as well?
Answered
Havana posted this in #help-forum
HavanaOP
why does nextjs 13 have no equivalent to router.refresh() that rerenders client components as well? or why it doesn't do both already
Answered by European sprat
I'm just wondering what it is you're trying to do that isn't working because router.refresh() should do everything you need. If for some reason you actually need to fully refresh the page you can use window location reload
5 Replies
European sprat
What issue are you experiencing?
@European sprat What issue are you experiencing?
HavanaOP
I've just noticed this while building sort of comment section component
Not that much of an issue as the solution would be just moving to rsc partly, which I guess would benefit my code a lot
but I'm just wondering why such refresh() for client components as well isn't a thing yet
European sprat
I'm just wondering what it is you're trying to do that isn't working because router.refresh() should do everything you need. If for some reason you actually need to fully refresh the page you can use window location reload
Answer