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

JS hasn't been invented to render on the client side but to allow interactivity.




What does that have to do with anything? The question was what do people use ‘now’ instead of this imperative table manipulation API, I’m unsure where you disagree with me.

It has to do with your previous comment…

> But if you render server side (as with PHP), you'd likely just build up your table on the server rather than dynamically on the client, so you would also not use these imperative table element specific APIs.


I feel like this is going nowhere...

The question was: What do people use now to create HTML tables instead of the table manipulation API described in this blog post.

I said:

- If you render a table on the client (not what JS was originally built for, but what it is often used for now) using a framework like React, you declaratively render the table using its semantic elements (table, thead, tbody, tr, td etc.) instead of imperatively building it up using that API

- If you render a table on the server, you essentially do the same (output the table markup)

That's why I described the above mentioned table API as "niche", which you seem to have taken offense with but I still have no idea why.

Maybe you're suggesting that this API is commonly used to add interactivity to a table element on a page with JS? I could see it being used for that, no idea if it is, I still have the feeling that just using regular Element APIs is more common - the question was also about creating tables specifically, not manipulating them, so that's why I mentioned declarative frontend frameworks.


The problem is that you keep representing the world as a false dichotomy.

A website can be fully rendered on the server at load time and still being interactive on the client side after that initial load.

In that situation, if you want to interactively create a table on your webpage, then you can either use generic DOM methods (which I suspect is the most common way), or you can use the dedicated API.

That's how we did websites back in the 2000s and that's still how most of them are made in practice because the “legacy” tech never went away even if it has minimal visibility on tech forums like HN.


Alright, thanks for explaining your point of view, I appreciate it!

It wasn't my intention to misrepresent anything, I can see how my original comment was perhaps a bit too broad, all I meant to point out was that when building tables dynamically on the client, a declarative framework is now (I thought) a common approach, how common it really is I have no idea, and I do not mean to diminish regular imperative DOM manipulation or label it as 'legacy' by any means.




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: