Better Link composition API #10695
cloud-walker
started this conversation in
Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all, surely this topic has been proposed in the past (considering the age of the library 😅 ), link me to eventual previous threads that I may have missed.
My current mental model about the Link component from react-router, now that I work with a lot of headless libraries (like Ariakit and Radix), is that in a way Link is an headless component too, but it lacks of an API to compose with UI components.
Both Ariakit and Radix has dedicated composition guides:
And considering their efforts on the topic, I'm proposing here to expose a similar approach, like the
render
prop from ariakit for example, so you can:This would maybe impact
NavLink
also, deprecating the current className solution 🤔What do you think?
Beta Was this translation helpful? Give feedback.
All reactions