Member-only story
Featured
State management without any library — Angular
Keeping track of data in web apps is super important, right? Lots of developers use fancy tools like NgRx, Akita, or NGXS to help with this. But guess what? You don’t always need those! We can manage data well in Angular without adding any extra libraries. Let’s see how!
Alright, let’s talk about a cool way to handle data in your Angular apps called the SAC Architecture. SAC is short for State Service, API Service, and Component. It’s a pretty straightforward method that helps you keep your data organized without needing any extra heavy-duty libraries. It’s a simple, built-in way to manage your app’s information.
What is SAC Architecture?
SAC stands for:
- State Service — Stores cached API data and manages state across the app.
- API Service — Handles all common API requests and stores responses in the state service.
- Components — Uses data from the API service and state service if saved in the Cache.
Here’s a flowchart to visualize how this architecture works:

Here are the final results look likes.