Skip to content

Refactor: Modernize budget viewer state with Signals#170

Open
The-Boyo wants to merge 1 commit intoitalanta:mainfrom
The-Boyo:feat/refactor-signals-state
Open

Refactor: Modernize budget viewer state with Signals#170
The-Boyo wants to merge 1 commit intoitalanta:mainfrom
The-Boyo:feat/refactor-signals-state

Conversation

@The-Boyo
Copy link

I began by identifying all the places where the parent and child components relied on RxJS streams (combineLatest, subscriptions, tap, ngOnInit logic) for state.
Next, I replaced those observable streams with Angular signals, created computed() values to derive the combined budgets, and replaced side-effect subscriptions using effect().
Finally, I updated the child component to accept signal-based inputs and removed lifecycle subscriptions, cleaning up the data flow so the parent’s reactive state drives the table directly.
With signal, state becomes easier to maintain because it contains less boilerplate. Signals also provide for faster state updates because they hold real data unlike RxJs which uses streams.
Signals reduce complexity to a large extend because they are easier to maintain and update synchronously while observables on the other hand have a complex set up system that makes it hard to tell even where a change occurs.
Both state management systems can coexist because observables are push-based event streams while signals are pull-based state containers.
I have used redux and it easier for managing global and complex state and handles asynchronous data better than local state management systems such as signals but signals shine when state is simple and local. All these systems compliment each other.

…nd child component budget-table to use signals other that RxJs.
@The-Boyo The-Boyo closed this Nov 29, 2025
@The-Boyo The-Boyo reopened this Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant