Thanks, it sounds like we are in agreement.
The "share some bits between client and server code" screams unnecessary coupling and failure to separate concerns between backend and frontend. That's what I've seen in practice anyway.
The "share some bits between client and server code" screams unnecessary coupling and failure to separate concerns between backend and frontend. That's what I've seen in practice anyway.
Having the same code running on client and server when your application is split between running both on client and server is very convenient.
As an example, a React application with server rendering and then progressive enhancements on the client. Very common pattern.