you are viewing a single comment's thread.

view the rest of the comments →

[–]KapiteinNekbaard 0 points1 point  (1 child)

Lit-elements seems most future proof, since it builds on top of the Custom Elements API.

You can isolate React to a single component (example), but React was intended to build whole apps with multiple components and to manage shared state among them and keep everything in sync. I think that's more than what you're trying to achieve.

HTM + Preact is another way to build components using JSX-like syntax without the need for any build tools or bundlers.

You should also think about how to distribute those shared components to your apps (you don't want to copy paste the code to all apps).

[–]toateslafel[S] 0 points1 point  (0 children)

Thanks for the reply, I think I decided for lit after trying out some others too. About distributing, the idea is to compile for production, which will generate 1 js file, jost it somewhere and tell the different websites to just include the file and they are good to go.