Skip to content

.pipe() not executing debounceTime #6724

Answered by voliva
KrisLau asked this question in Q&A
Discussion options

You must be logged in to vote

I think the problem is that you have the subscribe in the render function of your React component. Essentially, every time there's an update, you are making a new subscription which will do more trigger more updates, which will make more subscriptions, etc.

You need to wrap it in a useEffect, and properly clean the subscription up on the cleanup function.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@KrisLau
Comment options

@Skullcan
Comment options

@KrisLau
Comment options

@Skullcan
Comment options

@KrisLau
Comment options

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