Next.js · Middle · Question 22 of 75
What do you call in a client component to refetch the current route's server components?
- ✓Correct answer:
router.refresh()fromuseRouter() - 2
window.location.reload() - 3
router.push(pathname)with the same path
Explanation
router.refresh() makes a new request to the server and re-renders server components while preserving React and browser client state (scroll, typed input). location.reload() resets everything. In Server Actions, the counterpart is the refresh() function from next/cache.