Skip to content

Re-evaluate distinction between presentational and composite components #1046

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

Open
lyzadanger opened this issue May 22, 2023 · 1 comment
Open

Comments

@lyzadanger
Copy link
Contributor

The package currently distinguishes between presentational and composite components. To some extent this distinction makes sense — composite components are composed of numerous components, and by design don't allow as much control over their constituent component's configurations or styling — but I'm not (entirely) convinced anymore that the distinction need be made at an API level.

There's some blurring of the line between presentational and composite. Dialog, for example, is structured like a composite component but accepts presentational props (specifically, it allows classes, which the composite-component API does not).

I'd like to review the division at some point to see if it still makes sense as it is presently expressed. Having fewer types of components versus more is better for consumers and stability.

@lyzadanger
Copy link
Contributor Author

Notes:

  • Dialog and ModalDialog claim to be composite components in docs but are implemented as presentational components
  • Is the classes prop more accurately part of the styling API?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants