DEV Community

Discussion on: How old is client-side rendering?

Collapse
 
ben profile image
Ben Halpern

"Client side rendering" was always technically possible, there's nothing special going on you couldn't always do as long as JavaScript and the DOM existed. But I would say it was React that made it mainstream. I wasn't a big user of the "JavaScript frameworks" before React, but I believe Angular 1 generally attached itself to HTML elements you typically rendered on the server.

There were templating libraries which probably helped some people do client side rendering, but React really made it popular by popularizing the idea of writing HTML directly into JavaScript using JSX.

That's my interpretation of the history at least. I believe that is when folks started sending the data as json either as HTML data attributes or as an async call in componentDidMount etc.

Happy coding, I'm not totally confident in my answer but it's probably close.

Collapse
 
bassemibrahim profile image
Bassem

Ohh, I could be confused here πŸ˜•. I haven't looked at CSR like that before. So you mean the following scenario :

  1. Some HTML & JS initially load without content.
  2. JS does subsequent call to grab the content as JSON.

That's considered CSR? If that's the case. We can totally say that CSR is way older than React.

I was just thinking about Client-side routing and how ReactJS depends on the client (not the server) to grab content based on route.

Collapse
 
meddjelaili profile image
Mohamed Djelaili

client-side routing is another topic, and for the client-side rendering as @ben mentioned above it was there before react, but react comes with something called virtual dom which is a way to store the dom on memory and render it into the page using the react render function.