top | item 40759748

(no title)

nov21b | 1 year ago

Don't mindlessly follow your framework du jour's way of handling state mutations. It's healthy to keep these isolated. I've switched from Vue to React and kept my API server as is. If you intertwine mutations deeply inside Next.js server actions you will have a hard time adapting to new requirements.

discuss

order

verdverm|1 year ago

> If you intertwine ... deeply inside ... you will have a hard time adapting to new requirements

This is true of REST as well and more about code organization. Actions are often in their own directory and reusable, much like a business logic function you might call from a REST handler