Observable dies with skipWhile operator #115
Unanswered
syedfahimabrar
asked this question in
Q&A
Replies: 2 comments 2 replies
-
That's not the purpose of this. You need to query the store if you want the value. |
Beta Was this translation helpful? Give feedback.
0 replies
-
If you have some good reason for this you can probably do something like this: export function fetchTodos() {
return http.get(todosUrl).pipe(
tap((todos) => setTodos(todos)),
skipWhileTodosCached('todos', { returnSource: of([]).pipe(map(() => repo.getTodos())) })
);
} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Which @ngneat/elf-* package(s) are the source of the bug?
requests-cache
Is this a regression?
No
Description
In the documentation the skipWhile operator has been described as below:
but when i don't provide any return source then the observable dies. I don't want to pass an empty array either. I want the cached value in the next pipe.
i want to print the cached todos with tap like the above mentioned code.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in
Anything else?
No response
Do you want to create a pull request?
No
Beta Was this translation helpful? Give feedback.
All reactions