Remix Js/V2/Typescript 2 Update Links Function And Property Names

1.0.0Last update Sep 3, 2024
by@dfordp

Route links properties should all be the React camelCase values instead of HTML lowercase values.

Before

export const links: LinksFunction = () => {
return [{
rel: 'preload',
as: 'image',
imagesrcset: '...',
imagesizes: '...',
}, ];
};

After

export const links: V2_LinksFunction = () => {
return [{
rel: 'preload',
as: 'image',
imageSrcSet: '...',
imageSizes: '...',
}, ];
};

Build custom codemods

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

background illustrationGet Started Now