React tip: Group related props


React tip: Group related props.

Example: If two props are optional, but both must be set if used, group them via an object. This way, the related props are grouped.

Benefits:
✅ Clearer API
✅ Shorter prop names
✅ Programmatically disallows illogical prop combinations

#react

View original on X