Hacker News new | past | comments | ask | show | jobs | submit login

If we're just returning HTML, why the need for the boilerplate in that .mjs file?

Why not have your framework find standard .html files in a well-known location and wrap them in the boilerplate for me?

That way, I don't even need to think of them as something else - they are just HTML - and the magic is happening with me even seeing the wand




Having a different way of doing things for static HTML doesn’t seem simpler than just writing a JS function with no arguments.

I suppose it’s a matter of taste.


"Just writing a JS function".

You continue not getting it. That's an unnecessary overhead. Strictly speaking, you don't need it. If you can get away with not including it then you absolutely should skip it.

You guys can take some lessons from the so called static site generators. They have the right idea. Also Svelte which kind of does something very similar (although it does compile things to more vanilla JS which I like because less frameworks and inclusions).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: