> Much of the client-side code is about manipulating the DOM. Such code must assume the DOM-API exists. So such code can not run on the server unless there is some kind of ducky DOM environment there as well. And since client-side relies much on destructively manipulating the DOM, how can such code be tested on the immutable clojure server?
The same way as it's done in React. Think of a client app as a loop reacting to user /network events and turning state into html. The same way it's done on server.
That's why the same code can be used on client and server. The simplicity of the process (uses pure functions to turn immutable data structures to html) means that it can be also easily unit tested.
The same way as it's done in React. Think of a client app as a loop reacting to user /network events and turning state into html. The same way it's done on server.