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
Require props that are fundamental to the element (such as id and name for a form input), even if they aren't necessarily "required" HTML attributes. - Make all other props optional.
In practice, with react-uswds components, I find that sometimes I assign dummy values for id or name or both that I never need to refer to elsewhere, although sometimes I do specify and use both.
Describe the documentation you'd like
Would you consider removing this guideline and making id and name optional throughout? It would cut down on the amount of boilerplate required to use react-uswds components.
Does this documentation relate to a specific USWDS feature?
No, it's a general question about the design of many components.
Is your documentation related to a problem or inconsistency? Please describe.
The documentation on adding new components says:
In practice, with react-uswds components, I find that sometimes I assign dummy values for
id
orname
or both that I never need to refer to elsewhere, although sometimes I do specify and use both.Describe the documentation you'd like
Would you consider removing this guideline and making
id
andname
optional throughout? It would cut down on the amount of boilerplate required to use react-uswds components.Additional context
See #2752. CC @haworku.
The text was updated successfully, but these errors were encountered: