|
|
|
|
|
by spankalee
84 days ago
|
|
Lit is not opinionated about your build system You can write Lit components in plain JS, going back to ES2015. Our decorators aren't required - you can use the static properties block. If you think the DX is better with decorators... that's why we support them! And we support TypeScript's "experimental" decorators and standard TC39 decorators, which are supported in TypeScript, Babel, esbuild, and recently SWC and probably more. Regarding state: Lit makes it easier to write web components. How you architect those web components and where they store their state is up to you. You can stick to attributes and DOM if that's what you want. Some component sets out there make heavy use of data-only elements: something of a DSL in the DOM, like XML. It just turns out that most developer and most apps have an easier time of presenting state in JS, since JS has much richer facilities for that. |
|