3 ms·
It feels nicer to use functional components with declarative state than set dom attributes imperatively.
by toxicFork 4y ago
It feels nicer to use functional components with declarative state than set dom attributes imperatively.
- jsf01 4y agoPlenty of libraries have functional components and a react-like experience without the need for a virtual dom. Lack of vdom does not necessitate imperative dom usage.
- hinkley 4y agoIt’s the same observation TDD makes. If you can figure out what a sane interface looks like, it doesn’t matter how it’s implemented underneath. You might even want to change your mind for performance or new feature purposes.
- LAC-Tech 4y agolit-html is similar to the render method of a react component, uses a declarative html'esque syntax, and doesn't use a VDOM AFAIK. No one is saying update DOM elements manually. They're saying there's better strategies for view libs than VDOM.
- 7sidedmarble 4y agoThat's kind of an entirely different paradigm, considering lit is a Custom Elements framework.