-
Notifications
You must be signed in to change notification settings - Fork 84
Description
Issue Description
The Link component provided by the next-view-transitions package currently lacks a crucial feature: the ability to remain inactive when users click on a link pointing to the current page. This behavior diverges from the native Next.js Link component, which elegantly handles such interactions without triggering unnecessary page refreshes or reloads.
Critical Concern: The current implementation inadvertently causes an extraneous network request and a noticeable "flash" of page elements when clicking a link to the current page. This not only impacts the user experience but also potentially affects performance.
Desired Behavior
We propose enhancing the next-view-transitions Link component to:
- Gracefully handle clicks on links pointing to the current page without initiating any page transitions or reloads.
- Eliminate superfluous network requests in these scenarios.
- Prevent any visual disturbances, such as page element flickering.
- Maintain consistency with the native Next.js
Linkcomponent's behavior.
Additional Context
- Next.js version: 15.0.0-rc.0
- next-view-transitions version: 0.3.2
This enhancement is crucial for maintaining a seamless user experience, particularly for projects migrating from the native Next.js Link component to next-view-transitions. Addressing this issue will significantly improve both the performance and user experience of applications utilizing this package.
We appreciate your attention to this matter and look forward to any contributions or discussions that may arise from this proposal.