Hacker News new | ask | show | jobs
by untog 2889 days ago
React already does this, though perhaps not in the way you're imagining. You can use react-dom/server with your client side code to render out HTML templates, then when you run the code on the client side it'll call componentDidMount(), where you can add client-specific code.