DEV Community

Discussion on: Architecting React Apps Like it's 2030

Collapse
 
jackmellis profile image
Jack

As someone who spends 90% of their time in business logic, just throwing api in as an afterthought is a sad but very common move (although still significantly better than just stuffing api calls into your components).

I always ensure any medium-large scale application has something like onion/hexagonal architecture, where business logic has a defined home, api calls are abstracted into tech-agnostic functions, and there is a distinct divide between presentation and operations.

My ui layer does look a lot like this, but it really should just be one part of the application heirarchy, not the entire focus of it.