Hi everybody,
After reading v14 documentation on Packages. I'm wondering if now really everything needs to be a lit element? Cant i just load a simple .html as the dashboard "view"? I mean i like lit elements and all, but not so sure that every part of html should reside in the lit element. This is all very new for me. Another thing that im not sure about: can lit element pull its html template from separate .html file? Any tips are welcome.
Regarding LIT elements, you don't necessarily need to use a LIT element for every single view in your package. While LIT elements are the recommended approach for building new UIs in Umbraco 14 due to their reactivity and performance benefits, there can be cases where a simple HTML file might suffice.
Here's a breakdown:
LIT Elements: Ideal for dynamic views that update based on user interaction or data changes. They provide a clean way to manage state and handle user events.
HTML Files: Suitable for static views that don't require complex logic or data binding. You can still use these alongside LIT elements for specific parts of your UI.
For your dashboard view, if it's primarily static content, a plain HTML file might be okay. However, if you plan to have any interactivity or dynamic elements, using a LIT element would be a better choice
Packages in Umbraco 14
Hi everybody, After reading v14 documentation on Packages. I'm wondering if now really everything needs to be a lit element? Cant i just load a simple .html as the dashboard "view"? I mean i like lit elements and all, but not so sure that every part of html should reside in the lit element. This is all very new for me. Another thing that im not sure about: can lit element pull its html template from separate .html file? Any tips are welcome.
Hey David,
Regarding LIT elements, you don't necessarily need to use a LIT element for every single view in your package. While LIT elements are the recommended approach for building new UIs in Umbraco 14 due to their reactivity and performance benefits, there can be cases where a simple HTML file might suffice.
Here's a breakdown:
LIT Elements: Ideal for dynamic views that update based on user interaction or data changes. They provide a clean way to manage state and handle user events.
HTML Files: Suitable for static views that don't require complex logic or data binding. You can still use these alongside LIT elements for specific parts of your UI.
For your dashboard view, if it's primarily static content, a plain HTML file might be okay. However, if you plan to have any interactivity or dynamic elements, using a LIT element would be a better choice
Hey Tim,
yeah, since i posted my question, i did read up on lit a bit. It really can do some seriously nice things.
For anybody that is also wondering how to do things the new way, i strongly recommend Kevin Jump's profile on dev.to
is working on a reply...