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
At the moment this wouldn't work great with Calico, because modifiers are typeclass-based (#207). Another issue is that if the caller of MyComponent wants to add additional cls values, it would override the cls := "decoration" (#205). It doesn't compose well.
The composition issue in particular bugs me, since it's not just about the class attribute but basically any attribute. It's too easy to mess up the "component"'s internals when doing things externally.
Hence why I say "component", because it's not really well encapsulated. I feel like the answer might be #37: that we should make it easy to define true Web Components, that have proper encapsulation of their internals. Web Components specifically solves this issue of encapsulation.
The text was updated successfully, but these errors were encountered:
See also:
Modifier
be a typeclass? #207class
and other attributes #205Consider this Laminar-style example:
At the moment this wouldn't work great with Calico, because modifiers are typeclass-based (#207). Another issue is that if the caller of
MyComponent
wants to add additionalcls
values, it would override thecls := "decoration"
(#205). It doesn't compose well.The composition issue in particular bugs me, since it's not just about the
class
attribute but basically any attribute. It's too easy to mess up the "component"'s internals when doing things externally.Hence why I say "component", because it's not really well encapsulated. I feel like the answer might be #37: that we should make it easy to define true Web Components, that have proper encapsulation of their internals. Web Components specifically solves this issue of encapsulation.
The text was updated successfully, but these errors were encountered: