ryansolid / dom-expressions

A Fine-Grained Runtime for Performant DOM Rendering
MIT License
865 stars 124 forks source link

Feature: `renderToJSON`/`serialize` #106

Open lxsmnsyc opened 2 years ago

lxsmnsyc commented 2 years ago

Add an SSR feature called renderToJSON/serialize that instead of rendering an HTML markup, renders the JSON representation of the markup.

This is a very wild idea. Obviously, the SSR formats right now only support HTML so this feature might only work if the compiler itself is compatible to the runtime. Supposedly, renderToJSONAsync and renderToJSONStream are also similar ideas that can be added.