Starting to play around with Lit for a custom element project I’ve started, but I don’t think I can handle going back to class components after having experienced React hooks. The ability to extract complex behaviors into reusable hooks is just too useful. I would rather avoid class-based code where possible. #lithtml #customelements #WebComponents
@bhollis That's exactly what haunted JS is trying to accomplish. I can't personally vouch for its devex—I tried to use it for a couple of days on a project that it really wasn't suited to, and haven't had a chance to come back to it yet—but it might be worth a look! It's lit under the hood, just in a functional format

@fogoplayer thanks, that seems really interesting. The current path I'm exploring is to use #preact and then expose the component as a custom element via their adapters, but so far those don't seem fully baked (e.g. can't easily set scoped styles, apparently some unresolved bugs around the order of when elements are defined).

One nice bit is that I only really need to export a couple of top level elements - everything internal can be normal preact components.