top | item 21774206

(no title)

honopu | 6 years ago

Depends. It sure is nice to write helper functions that I can import on the serverside js and in the client side. Also if you use next or nuxt or something like that you get universal rendering, which is nice. Totally depends on your use case.

You just have to keep an eye on your client bundle size if these shares functions ref something like underscore, moment or something like that where you’re pulling in the entire thing for one function. I’m aware you can just pick pieces with {} and import, but not everyone is aware and often require the entire thing.

discuss

order

egeozcan|6 years ago

The purpose of next (and perhaps nuxt, I've never used it) is more in the direction of a front-backend. The API-implementing level is usually very different than the one consuming it, even when the consumer is on the server-side. If this wasn't the case, IMHO, projects like Meteor would be immensely more popular.