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
attr use-cases are limited - reflecting something in DOM, like, in markup. That is needed for hydration, selecting something via CSS (styling from outside). There's almost no sense deserializing internal component props - they should be always real props, not some fake attributes.
Note: not all attributes are reflected to props: aria-, dataset (not necessarily), itemset, class, style, data-* attributes etc. Ideally these are handled by appropriate domains.
One possible solution - fall back to incremental-dom way: primitives are reflected to attrs, fns and objects are not.
The other possible (svelte) solution - detect which props are defined on elements as props and reflect them as attrs, otherwise use props.
Considering #48 as well - what strategy is the most favorable for K.?
The text was updated successfully, but these errors were encountered:
attr
use-cases are limited - reflecting something in DOM, like, in markup. That is needed for hydration, selecting something via CSS (styling from outside). There's almost no sense deserializing internal component props - they should be always real props, not some fake attributes.Note: not all attributes are reflected to props:
aria-
,dataset
(not necessarily),itemset
, class, style, data-* attributes etc. Ideally these are handled by appropriate domains.One possible solution - fall back to incremental-dom way: primitives are reflected to attrs, fns and objects are not.
The other possible (svelte) solution - detect which props are defined on elements as props and reflect them as attrs, otherwise use props.
Considering #48 as well - what strategy is the most favorable for K.?
The text was updated successfully, but these errors were encountered: