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 className prop, as I understand it, was added so that a consumer can safely assume that every component will take it. I feel as though we should also always allow:
ref (React Ref)
id (string)
Reasoning / thought process
ID: Jump links or other unique
ref: allowing this allows consumers to avoid using document.querySelector
I'm happy to create a PR to add a base type. Something like:
Sounds reasonable @rfearing, I like it 👍. We'd need to wrap each component function with forwardRef to make refs work, but the others seem pretty straight forward to retrofit.
The request
The
className
prop, as I understand it, was added so that a consumer can safely assume that every component will take it. I feel as though we should also always allow:ref
(React Ref)id
(string)Reasoning / thought process
document.querySelector
I'm happy to create a PR to add a base type. Something like:
The text was updated successfully, but these errors were encountered: