Skip to content

Example of updateRequestStatus to handle HttpClient errors #28

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

You must be logged in to vote
import { setRequestStatus } from '@ngneat/elf-requests';

this.http.get('').pipe(
 tap((todos) => setTodos(todos)),
 setRequestStatus(todosStore, 'todos')
)

The above code will do everything for you.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@ogix
Comment options

@NetanelBasal
Comment options

@NetanelBasal
Comment options

@NetanelBasal
Comment options

@ogix
Comment options

Answer selected by ogix
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