-
Notifications
You must be signed in to change notification settings - Fork 500
[2.x] Allow custom component on Link "as" prop in React and Vue3 #2264
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
base: master
Are you sure you want to change the base?
Conversation
@joetannenbaum Can this be merged? |
# Conflicts: # packages/react/src/Link.ts # packages/vue3/src/link.ts
@joetannenbaum is there anything that needs to be done before this can be merged? |
What's the hold up? All checks seems like have passed, why is this still not merged? It's something that is really needed. Why is this PR being ignored? |
Sorry for the lack of communication here, I've been thinking about this PR for a while now. While I understand the need being addressed here, I don't think this is the way I'd like to go about solving it for two primary reasons:
I'd rather invert the solution, something like (totally theoretical, still working on this): const asLink = useAsLink();
return (
<MyCustomLink {...asLink('/users', { prefetch: true })} />
); Benefits are:
This is on my list of PRs to examine in the next two weeks. |
Appreciate the response @joetannenbaum . I tend to think it would operate similarly to Vue's native
I'm not fully confident this would be better, just giving another DX alternative that could perhaps keep the same native-feeling behavior as before, while still providing an escape hatch for the rare prop collision scenario. This would also avoid having multiple ways for overriding the |
This PR is based on the changes made in #1940 and so all credits should go to @guizoxxv
This has atleast been requested in: #1550, #1654, #1668 and #1746 as well.
Could also solve vuetifyjs/vuetify#11573.