-
Notifications
You must be signed in to change notification settings - Fork 24
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
Use useId instead of requiring consumers to provide an id as a prop #2575
Comments
I think we can make all |
Definitely don’t want to remove support for providing an Originally we didn’t do this because of Kuma actually as it caused inconsistency in the snapshot testing that had to be addressed. My only requirement is that we generate the id in an SSR-compatible way as to prevent hydration errors. (Generating with Vue’s native |
Thanks for the info, providing a default at a minimum sounds fine to me!
Interested in understanding cases where it's helpful to have the consumer provide one (I guess apart from cases where you'd use Vue HTML lmk!
Not totally aware of the ins-and-outs of this as I think this was when I'd just started working on Kuma, but FYI we got rid of snapshot testing as soon as we could. So whatever this reason is, its not necessary for Kuma anymore. Plus, I think with the monotonic/lamport-clock-like
Yep absolutely, I made sure to put this in the issue description, agree using Vue's |
Also see #2562 (review)
Ideally if an
id
is only required internally by a component for aria or other reasons, then a component should instead use Vue'suseId
to provide thatid
instead of requiring the consumer of the component to provide one.This goes for any component that uses
id
similarly not just KCodeBlock (which the above comment/link refers to)The text was updated successfully, but these errors were encountered: