Wouldn't this throw hydration errors if your SSR HTML does not exactly match your client side HTML?
You could, for instance, as part of a server payload send back a JavaScript object full of state and the frontend will read from it and render accordingly. But that would require not using a framework and building it yourself, which I think developers nowadays aren't keen on doing.