abdullahmorrison / maya-bingo

A website that lets users play a bingo game about the Twitch streamer and animal conservationist, Maya Higa
https://mayahigabingo.netlify.app/
2 stars 0 forks source link

Infinite loop when subscribing to an observable #1

Closed abdullahmorrison closed 2 years ago

abdullahmorrison commented 2 years ago

When subscribing to the board to check for a bingo, I want to dispatch the bingo action, but that causes an infinite loop because the dispatch creates a new stream which checks if there is a bingo and dispatches the same action.

Assignees: @abdullahmorrison Labels: bug

abdullahmorrison commented 2 years ago

Solved with a throttle (kind of hacky)

abdullahmorrison commented 2 years ago

created improved solution by refactoring the observable