DEV Community

Discussion on: Best way to output HTML in Ajax reponse

Collapse
 
ben profile image
Ben Halpern

I could see a reason for sending over the markup, but in general, I'd send over the data and let the view handle the logic. These days, if you are using a client-side framework, it has a lot of opinions on the matter, and you are generally trying to simply pass data.