Skip to content

EffectFn + DataSource #352

Answered by NetanelBasal
OmerGronich asked this question in Q&A
Discussion options

You must be logged in to vote

It needs to be added to the HTTP request:

  getTodos = this.createEffectFn(($: Observable<void>) =>
    $.pipe(
      mergeMap(() =>
        this.http
          .get('https://jsonplaceholder.typicode.com/todos')
          .pipe(trackRequestStatus())
      ),
      tap(setTodos)
    )
  );

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@OmerGronich
Comment options

Answer selected by OmerGronich
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants