realize ssr_ - Respo/respo.calcit GitHub Wiki

realize-ssr!

This one is complicated. I wrote a long post before trying to explain this new feature. The code looks like this:

def ssr? (some? (.!querySelector js/document "|meta.respo-ssr"))
def mount-target (.!querySelector js/document "|.app"))

if ssr?
  realize-ssr! mount-target
    comp-container @*store ssr-stages
    , dispatch!

The job of realize-ssr! function is to simulate a virtual DOM of currently rendered HTML from server, so that the followed virtual DOM rendering steps can run a little easier.

⚠️ **GitHub.com Fallback** ⚠️