New Built-in Link Component #766
jacobdalamb
started this conversation in
Proposal
Replies: 3 comments
-
I think what will be great is the ability of passing href as an object as nextjs supports it. This is specially useful when working with query params <Link
href={{
pathname: '/path',
query: { foo: 'bar' }
}}
>
My Link with Query Params
</Link> |
Beta Was this translation helpful? Give feedback.
0 replies
-
Could be great to see this published to npm as a user package people could install and use! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Updated Link component |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Introduce a built-in
Link
component in Astro for enhanced, automated handling of different types of links, streamlining development, and improving site performance.Background & Motivation
Currently, handling different link types in Astro requires manual effort and increases the complexity of link management, which can lead to errors and inefficiencies. This component addresses these challenges by providing a unified, intelligent way to handle links, enhancing developer experience and site performance.
Goals
mailto:
,tel:
) with appropriate SEO and performance attributes.rel="external"
,rel="prefetch"
) to links based on their type, improving SEO and site performance.Example
Link.astro
Index.astro
This example illustrates the ease of using the
Link
component to handle various types of links, showcasing its versatility and utility in an Astro project.Beta Was this translation helpful? Give feedback.
All reactions