Use the app's shared Link component, not raw anchors, for internal routes
An AI coding agent added a 'Back to settings' control as a raw HTML anchor instead of the app's existing Link component. The raw anchor triggers a full page reload, drops draft state, skips prefetching and the design system's active styling, and bypasses features like locale prefixes, scroll restoration, and analytics hooks. The author recommends treating raw internal links as a review issue, reserving plain anchors for external URLs, mailto links, and file downloads. Reviewers are advised to search diffs for raw anchors to in-app paths and to enforce shared components or existing lint rules.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in