Replies: 1 comment 3 replies
-
At the time started the project, LitElement was not even announced. UI5Element is similar to LitElement a thin wrapper for the custom element API provided by the browser so that repetition can be reduced when developing web components. When LitElement was released, we did evaluate whether we should switch to it, but since we had to support IE11, we wanted to have tighter control to what can be optimized in the base class. In the end, the size of the base class is not something big that would benefit from reuse and we still encounter requirements that are best solved in the base class which would require a fork of LitElement if we had chosen it. As for handlebars, there are two main reasons:
It is also worth mentioning that using handlebars is fully optional, as the component developer can write a lit-html template by hand and import it from the component (we used to have such a component when the templating didn't quite work, but then extended the templating for the necessary usage). Finally, the renderer can also be substituted with any other renderer technology (like virtual dom) by returning a different renderer class for the element. Overall handlebars is fully optional and is the preferred choice for our development of the |
Beta Was this translation helpful? Give feedback.
-
Hello,
What is the main difference between lit-element and UI5Element? Why did you decide to write yout own base class?
Why do you use handlebars as template and not lit-html direct? That seems to be an unnecessary build step.
Beta Was this translation helpful? Give feedback.
All reactions