Samuel
@samuel.fm
Managed to take a client website from 10+ second load to near-instantaneous today using a home-build React SSG solution. Man that feels good
1 14
Zaratzara
Amazing! I’ve got a functioning mechanism jury rigged for my virtual DOM library of choice (Mithril) — early exit first server render by throwing and catching an error on first DOM ready hook (T), then on client temporarily (until T) override DOM creation APIs to parse instead…
1 1
Samuel
The actual mechanism in React is super simple - just call hydrateRoot(root, <App />) The tricky part is generating the dehydrated HTML from a legacy django monolith. I ended up adding a JS-based worker to the existing Celery system to pick up the React caching jobs and put the output into Redis
1 1
Samuel
It’s not quite done yet - quite a few rehydration mismatches, but I literally just pulled an all-nighter to get the basic thing working so that’s a job for another time I think
1 1