Live data from Hacker News

You can make up HTML tags

maurycyz.com

201–202 of 202 posts

Re: You can make up HTML tags

#201

Exactly why I banned React from my pipelines years ago, native Web Components + dispatchEvent gives you the modern web without bloat and churn, and Vite for a lightweight HMR thanks to native ES Modules. Server-side you can use jsdom to polyfill document, it supports Web Components too.

web components are terrible and should not be used for modern development with the exception of very nieche use cases that require sandboxing

Custom elements are web components, it's literally what the article is about

Re: You can make up HTML tags

#202
post #199

Earlier quoted context omitted.

Well, that's why I include JS files at the bottom of my HTML body, to make sure to avoid exactly this problem: https://github.com/yawaramin/dream-html-ui/blob/92f2dfc51b75...

One drawback. ► execute at bottom of file ► execute Both do the same; they execute script after DOM was parsed. When your JS creates GUI you now have to battle FOUCs. ► "import" loads your script async so it _could_ load before _all_ DOM has parsed... but 9999 out of 10000 scenarios it won't

That's why my JS doesn't create the GUI, it just attaches event handlers to the GUI rendered on the server. Check the link I posted above...
Post reply on HN