Skip to content

Commit

Permalink
feat: solution of challenge 50
Browse files Browse the repository at this point in the history
  • Loading branch information
tomalaforge committed Jun 11, 2024
1 parent ecc7c8d commit 0e72752
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions apps/signal/50-bug-in-effect/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,20 @@ export class AppComponent {
gpu = model(false);

constructor() {
/*
Explain for your junior team mate why this bug occurs ...
*/
effect(() => {
if (this.drive() || this.ram() || this.gpu()) {
if (this.drive()) {
alert('Price increased!');
}
});

effect(() => {
if (this.ram()) {
alert('Price increased!');
}
});

effect(() => {
if (this.gpu()) {
alert('Price increased!');
}
});
Expand Down

0 comments on commit 0e72752

Please sign in to comment.