▲ | gitaarik 7 days ago | |
I made a state management lib for Lit, that's just as lightweight (258 lines) and intuitive: https://github.com/gitaarik/lit-state I've used it extensively myself, for creating complex web apps with many (nested) components interacting with each other. I don't understand why Lit hasn't gained more popularity, because for me it is basically React, but then more browser-native, much less boiler plate, and much faster rendering. There are some things you have to get used to, but when you do it doesn't limit you in any way. | ||
▲ | Ruphin 7 days ago | parent [-] | |
Re-implementing Lit from fundamentals is a great way to learn how it works! The core functionality is surprisingly simple, because it mostly relies on platform APIs to do the heavy lifting, like parsing templates. I made this alternative implementation of lit-html to use as a research bed a long time ago when I was actively contributing to lit: https://github.com/ruphin/lite-html Judging from this thread, many people have their own implementations, which is great to hear. I think there's a lot of value in solutions that are so simple that anyone can reproduce them. |