Post

I have accidentally created a shit reimplementation of lit.dev in my component lab while iterating on the parts of making my components that have felt lacking. I think it’s time to just migrate to Lit.

3 reposts40 likes

Out of interest was it the lit-html part or lit-element? I find lit-html the most valuable part personally. I even have a little toy library that's using Vue reactivity with lit-html and a Vue esque component API.

A bit of both, really. I had my own set of functions to make DOM elements that worked but was very shonky. Then I found HTL and thought it was cool. Then I realised lit-html has similar ergonomics but does partial rendering. I’d implemented my own @property decorators that aren’t as nice as Lit’s.

It has been a lot of fun reimplementing it so far. I feel like I wouldn't have wanted to go straight to Lit without having a go on my own first. I appreciate what Lit's giving me now, having struggled to implement parts of what it does myself.

If I hadn’t done it I don’t think I’d feel as compelled to move over to Lit. Everything you’ve got feels like a much cleaner and considered version of what I’ve made. It also looks like you’re fiercely committed to web standards. I get the sense Lit will continue to build on, not around, the web.

I've been there as well, great exercise though, and very fun to implement, but eventually you inevitably end up with just Lit anyway.

It's a common story :) There's a hard-earned reason for everything in Lit. Lot's of times people think they can do something simpler, then realize they really do need the things over time. Like, we would definitely drop features if they weren't needed!