Skip to content

support next/link as="..." prop to mask routes when using client side routing #5482

Open
@Talor-A

Description

@Talor-A

Provide a general summary of the feature here

i'd like to be able to use nextjs's route masking via the as prop. here's the prop in the nextjs documentation.

🤔 Expected Behavior?

can use <Link href="..." as="..." /> or similar syntax with react-aria-components

😯 Current Behavior

the as prop is not allowed, and users will be taken to the un-masked href that we don't necessarily want them to see.

💁 Possible Solution

allow passing some data up to the top level router, maybe?

🔦 Context

in our app, our URL's don't always correspond to the nextjs page paths behind the scenes. we use <Link href="..." as="..." /> to rewrite the visible path of the url for the user.

I'm really excited about react-aria-components and its support for client-side-routing, but I don't see a way to use the behavior together.

💻 Examples

No response

🧢 Your Company/Team

replit.com

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions