prashantpalikhe / nuxt-ssr-lit

SSR support for Lit elements in Nuxt3
Other
47 stars 7 forks source link

Properties of elements can be incorrectly rendered #30

Closed steveworkman closed 1 year ago

steveworkman commented 1 year ago

Describe the bug The lit renderer can be over-eager when rendering properties and attributes of web components. It can render properties that should not be reflected, and can sometimes render properties in an incorrect state

To Reproduce Steps to reproduce the behavior:

Take a component like <my-modal :open="false"></my-modal> This currently renders <my-modal open></my-modal>

Expected behavior

It should render <my-modal></my-modal>

Additional context

There are other issues here too, including that complex objects or arrays of data are rendered as [object Object] whereas these should also not be rendered

steveworkman commented 1 year ago

In addition to this, <my-input :value='val'> where val is an empty string renders as <my-input value='true'> as the plugin is incorrectly assuming that this is a property