diff --git a/apps/signal/51-function-call-effect/src/app/action.component.ts b/apps/signal/51-function-call-effect/src/app/action.component.ts index 22e0e7a4f..c05f6b289 100644 --- a/apps/signal/51-function-call-effect/src/app/action.component.ts +++ b/apps/signal/51-function-call-effect/src/app/action.component.ts @@ -4,6 +4,7 @@ import { effect, inject, signal, + untracked, } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { UserService } from './user.service'; @@ -38,7 +39,8 @@ export class ActionsComponent { constructor() { effect(() => { - this.userService.log(this.action() ?? 'No action selected'); + const action = this.action() ?? 'No action selected'; + untracked(() => this.userService.log(action)); }); } }