SolidJSS
SolidJS2y ago
26 replies
iNdra

How SolidStart SSR (& hydration) work?

I would like to know how SSR work in SolidStart.

When HTML DOM add to web page and render in server, it sends to client side (browser). Then client side handle events, states etc. (Dynamic parts). is this correct, how Solid knows Components or DOM to handle events (referencing) ? It has pre rendered content before JS load in client side (browser).

When use SolidJS, JS return DOM and reference to the code within the JS code like button click event. How solidstart reference it when DOM in page not in JS file?

If SSR use following method, it can handle dynamic parts like solidjs.

Sever Side DOM ---> Client Side Solid Code ---> Render. (This method need to run JS after page full load so SSR may not be this method)

If you can explain it with code, it will be better.

Old days PHP use for SSR and JS or JQuary use to handle event by referencing ID value or Class values.
Was this page helpful?