polyhedra-viewer
polyhedra-viewer copied to clipboard
[Bug] testing error "Cannot flush updates when React is already rendering."
I’m getting this weird warning on npm test
:
Warning: unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.
in video (at Masthead.tsx:24)
in a (created by LinkAnchor)
in LinkAnchor (created by Context.Consumer)
in Link (at Masthead.tsx:22)
in VideoLink (at Masthead.tsx:93)
in div (at Masthead.tsx:91)
in Masthead (at HomePage.tsx:23)
in main (at HomePage.tsx:22)
in Main (at HomePage.tsx:79)
in div (at HomePage.tsx:78)
in HomePage (at App.tsx:27)
in Route (at App.tsx:23)
in Switch (at App.tsx:22)
in Suspense (at App.tsx:21)
in _default (at AppPage.tsx:31)
in Router (at AppPage.tsx:30)
in WrapperComponent
It's probably because I'm setting muted
on the video which is needed to have the video autoplay on mobile.
It's annoying but not a high-priority issue -- I'm planning on replacing the video with something more interactive anyways.