Ankit kaushik
Mar 5, 2023

I could see you are resetting your todoList$ observable three times (initially, on search, on modal close), instead you could find a declarative way to club these parameter in the declaration itself. Somewhere on these lines:

todoList$ = merge(this.refresh$, this.search$).pipe(

startWith(null),

switchMap(() => this.getTodoList())

)

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Ankit kaushik
Ankit kaushik

Written by Ankit kaushik

Frontend Tech Lead, Angular Expert

No responses yet

Write a response