I started working on Xania Web's Fastest JSX based Library since back in 2014.
SSR is mainly hard because of serialization of
runtime state. Part of it is the need for javasript bundler at runtime. Basically we need to examine the data we are sending to the client, determine what types are used, track back where those types are defined in code (which I am not sure is even possible), create a hydration script which imports these types. And, it get even hard if we also want to serialize closures. After that framework specific handling can take over...which is relatively easy to do.
There are a couple of framework solutions with support for hydration (rehydration/resumability/lazy/partial,etc....) like
Marko, etc... but it is sad to see that none allows an incremental / progressive adaption. They all are coupled to either a view library, routing or toolchain, I just want to use
Xania and add Hydration to the mix.
Here is the challenge I am taking on:
- Is it possible to statiscally generate rehydration script at compile time? I am thinking of a solution that is using rollup transform plugin,
- Or otherwise, create a serializer, runtime bundler and hydration script.
I have little to no experience in this area, so any suggestion are very welcome.
Top comments (0)