Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm confused, every example is 100 times the code I would write using straight html... Is there a benefit I'm missing?


It creates dynamic content on the client side.

When you need this, you need it. When you don't, prefer static html.

Keep in mind, the folks who write developer documentation for things like this have had their head in this problem space for a long time. So there's less explanation of the "what" and "why", and examples tend to be more oriented to the "how".


>When you need this, you need it. When you don't, prefer static html.

He didn't said "static html". He said "straight html". Which I presume means "also factoring in plain JS code".


Right, I said "static html" not meaning to imply that it was the same thing. I wouldn't consider "straight html" to include script code, but I think it's a valid criticism of my advice that it is oversimplistic.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: