Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Jazbec 22 posts 144 karma points
    May 20, 2024 @ 15:43
    David Jazbec
    0

    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.

  • Bishal Tim 26 posts 115 karma points c-trib
    May 21, 2024 @ 18:41
    Bishal Tim
    100

    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

  • David Jazbec 22 posts 144 karma points
    May 21, 2024 @ 18:52
    David Jazbec
    2

    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

Please Sign in or register to post replies

Write your reply to:

Draft