7900 shaares
161 private links
161 private links
What's your favorite solution for not-quite-component components?
With those I mean components that are more boilerplates to be expanded upon, instead of actual ready-to-go components you just tweak a few details of. Components that would grow too complex if you'd need to account for all possible interaction and design versions through props or CSS custom properties.
I think often the alternative is composability: ie. what's the minimum functionality that the cookie consent component could have? Could it be a wrapper that provides cookie-setting functionality to whatever UI component it wraps? Could it be a little JS module different components could import to reuse?