Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Talor-A opened this issue Nov 27, 2023 · 1 comment
Labels

Comments

@Talor-A
Copy link

Talor-A commented Nov 27, 2023

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

@LFDanLu
Copy link
Member

LFDanLu commented Jan 12, 2024

We are planning on adding router options to Link, but we aren't sure about how to handle as here, would need to investigate how exactly this works/is communicated in NextJS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants