Next/13/New Link

1.0.2Last update Jul 24, 2024
by@Codemod
Next.js
migration

Safely removes <a> from Link components imported from the next/link module or adds the legacyBehavior prop on the component level.

Example

Before

export default function Component() {
return (
<Link href="/a">
<a>Anchor</a>
</Link>
);
}

After

export default function Component() {
return <Link href="/a">Anchor</Link>;
}

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now