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…
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
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