Create views as components using DOM. Run the same code on the browser and on the server.