VanJs Hydration Example, just a different approach #244
Replies: 3 comments
-
It seems in your example it would be better to use van_element |
Beta Was this translation helpful? Give feedback.
-
in my opinion, the main goal of server side rendering is to display a finished DOM without any client side rendering |
Beta Was this translation helpful? Give feedback.
-
Thanks for the tip. I didn't know about Web Components until now. |
Beta Was this translation helpful? Give feedback.
-
I looked at the Fullstack Rendering example and am excited about the idea of working with VanJs in both the frontend and backend. Quite apart from the fact that this is a demonstration, I wonder whether it makes sense to install components in the backend that are then replaced in the frontend.
This gave me the idea of adding placeholders in the backend that would be replaced with the dynamic components in the frontend.
A placeholder looks something like this
And this is vanComp
Simple components are used in the client, shared components are not necessary. Hydration is also done with a general function.
Here is my project
Beta Was this translation helpful? Give feedback.
All reactions