You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The enhancements from #5864 have been great to support features we use from React Router. We are running into an issue though with the fact that when passing useHref to RouterProvider we lose the ability to use external links as all RAC href values get passed to useHref. It would be convenient to have a way to opt-out of useHref or detect an external link so both kinds can exist in an app.
🤔 Expected Behavior?
Set useHref in RouterProvider with React Router's version. There is a way to pass https://www.google.com to a RAC href prop and opt-out of passing it to useHref so that the final value is https://www.google.com.
😯 Current Behavior
Set useHref in RouterProvider with React Router's version. Passing https://www.google.com to a RAC href prop results in [current_url]/https://www.google.com.
Provide a general summary of the feature here
The enhancements from #5864 have been great to support features we use from React Router. We are running into an issue though with the fact that when passing
useHref
toRouterProvider
we lose the ability to use external links as all RAChref
values get passed touseHref
. It would be convenient to have a way to opt-out ofuseHref
or detect an external link so both kinds can exist in an app.🤔 Expected Behavior?
Set
useHref
inRouterProvider
with React Router's version. There is a way to passhttps://www.google.com
to a RAChref
prop and opt-out of passing it touseHref
so that the final value ishttps://www.google.com
.😯 Current Behavior
Set
useHref
inRouterProvider
with React Router's version. Passinghttps://www.google.com
to a RAChref
prop results in[current_url]/https://www.google.com
.💁 Possible Solution
Add an optional prop for RAC where
href
androuterOptions
are available to opt-out of passing it throughuseHref
or detect an external link similar to how RR does this https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/index.tsx#L958-L982🔦 Context
I want RAC links to support both client-side routing and external links simultaneously when using
useHref
inRouterProvider
.💻 Examples
No response
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: