mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
It's a common UI pattern for apps to refresh when you click a link to the current page. So when this happens, we refresh the dynamic data in the page segments. Note that this does not apply if the any part of the hash or search query has changed. This might feel a bit weird but it makes more sense when you consider that the way to trigger this behavior is to click the same link multiple times. We should probably refresh the *entire* route when this case occurs, not just the page segments. Essentially treating it the same as a refresh() triggered by an action, which is the more explicit way of modeling the UI pattern described above. Also note that this only refreshes the dynamic data, not static/cached data. If the page segment is fully static and prefetched, the request is skipped. (This is also how refresh() works.)