react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

Support client-side routing for all components with href prop

Open universse opened this issue 2 months ago โ€ข 7 comments

Provide a general summary of the issue here

From documentation, only Link and MenuItem are supported. Seems to be because only those 2 are making use of handleLinkClick. Other components, such as Tab, ListBoxItem etc, should work similarly.

๐Ÿค” Expected Behavior?

Using TanStack Router's createLink to wrap components with href prop allows client-side routing. Haven't got a chance to test with other routers.

๐Ÿ˜ฏ Current Behavior

Using TanStack Router's createLink to wrap components with href prop results in full page refresh.

๐Ÿ’ Possible Solution

No response

๐Ÿ”ฆ Context

No response

๐Ÿ–ฅ๏ธ Steps to Reproduce

https://react-spectrum.adobe.com/react-aria/routing.html#tanstack-router https://stackblitz.com/edit/tanstack-router-xkvvewjr?file=package.json,src%2Fmain.tsx&preset=node

Version

1.12.1

What browsers are you seeing the problem on?

Firefox

If other, please specify.

No response

What operating system are you using?

Windows 11

๐Ÿงข Your Company/Team

No response

๐Ÿ•ท Tracking Issue

No response

universse avatar Sep 24 '25 18:09 universse