Blaze.render vs Blaze.toHTML?

What difference of Blaze.render vs Blaze.toHTML, and when/where should use it?

Are you kidding man! It is fully documented
Blaze Render - Renders Template or View to DOM and returns a View instance (your Template’s onCreated, onRendered callbacks would fire here)

Blaze to HTML - Returns HTML string as a result of materializing some Template or View. No View instances are created here.

1 Like

@theara I think you should read up on Blaze, how it works. And especially the sections about Template and View.

In Blaze world, a generated HTML is not something you see on the page. It is something that can be placed on the page but also something you can do other things with, for example assemble an HTML mail, or a server side response to a route etc.

Blaze render is what assembles a piece of html fully with its data to be actually put on the page.

Perhaps you should also read