But just because it’s the same language doesn’t mean you should treat it the same in both circumstance. As Remy puts it:
One for the server - where you can go wild.
One for the client - that should be thoughtful and careful.
To me it seems obvious that there should an entirely different mindset for writing code intended for a web browser. But nothing’s ever really obvious.
I remember when Node was getting really popular and
npm came along as a way to manage all the bundles of code that people were assembling in their Node programmes. Makes total sense. But then I thought I heard about people using
npm to do the same thing for client-side code. “That can’t be right!” I thought. I must’ve misunderstood. So I talked to someone from
npm and explained how I must be misunderstanding something.