DEV Community

Discussion on: Server Rendering in JavaScript: Why SSR?

 
brucou profile image
brucou • Edited

Oh I see. I indeed misunderstood you. You are talking about a common intermediate representation from which you can derive multiple formats fitting given SSR engines. The difficulty would be to express both logic (if, loops, event handling, etc.) and parameterization (props of the component to use a React terminology) in that intermediate representation (otherwise the component would be just HTML which is understood already by all engines) in a way that allows for recombination into the target languages. Is that correct?

I thought about Inertia because it skips the problem by not making any attempts to understand a component meaning. It just passes the component information back to the client to be parsed there by whatever framework the client uses. So instead of running comp(a, b, c) or transpiling comp into a template, it passes comp, a, b, and c forward. It is true that you can't really call that rendering.