Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make webcam loading spinners appear/disappear more reliably #175

Merged
merged 2 commits into from
Oct 12, 2024

Conversation

markspolakovs
Copy link
Member

@markspolakovs markspolakovs commented Oct 11, 2024

The effect based approach was flawed in that React wouldn't re-run the effect if the readystate changed (even though it was in the list of dependencies, changes to stuff happening on refs doesn't trigger re-renders which therefore wouldn't trigger it to check for the effect dependency).

Replace it with an event-based approach.

(Also replaces useDisclosure with a useState to make the linter easier to appease.)

@jenkins-ystv
Copy link

jenkins-ystv bot commented Oct 11, 2024

Deployed a preview of this PR to https://pr-175-internal.dev.ystv.co.uk

Copy link
Member

@archessmn archessmn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@markspolakovs markspolakovs merged commit d1ec3de into main Oct 12, 2024
3 checks passed
@markspolakovs markspolakovs deleted the mp/webcam-spinners-fix branch October 12, 2024 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants