79791759

Date: 2025-10-16 03:57:24
Score: 0.5
Natty:
Report link

Your signal store method

withMethods(store => ({
  setUsername: rxMethod<string>(
    pipe(tap(username => patchState(store, { username })))
  ),
})),
username = input.required<string>();

ngOnInit() {
   this.#store.setUsername(this.value);
}

this way you wont need effects or ngOnChanges

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: John