Purpose of returning HTML as a Node response

Viewed 22

What is the point of returning HTML as a response from a Node.js server?
I understand templating engines like Pug allow you to generate dynamic HTML using variables.
What I don't understand is why you wouldn't simply return JSON as a response, then use what is returned to render something based on that. I use React for example, so I could render render some JSX dynamically instead

0 Answers
Related