(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.
verdverm|1 year ago
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