ssrRender vs render #9151
woldtwerk
started this conversation in
General Discussions
Replies: 2 comments
-
If I'm not wrong both ssrRender and render work in ssr, however, ssrRender has particular optimizations for that case so it will have a better performance. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The render functions generate code that updates the DOM (using the Document Object Properties and Methods), while ssrRender updates the HTML page directly. In a nutshell, ssrRender bypasses updating the DOM. Since we have the virtual DOM, it's safe to do so. You can play here to see the difference: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to integrate Vue ssr into another system (non node based). I tried various things and noticed that using the compiled Vue components with the various render functions from vue/server-renderer works just fine.
I also noticed that Frameworks like astro build components with ssr flag. E.g. vite build --ssr.
This generates different component code. Most notably the components have an ssrRender function instead of render. I can't quite understand what the difference is.
Can somebody enlighten me? If the client bundle works just fine I would prefer to use that version for ssr and hydration, instead of compiling twice.
Beta Was this translation helpful? Give feedback.
All reactions