Closed syrekable closed 3 years ago
idk xd
Most likely the issue was that since BackgroundMusic was a child of the AddFriends component, and AddFriends not only rerendered but it also got removed and added conditionally which caused not only a re-render of BackgroundMusic but a whole teardown which is why I think useRef
didnt help cause it should have helped with re-renders.
[bug] background music overlap
Summary
The background music plays just fine during the normal flow of the program, but if you decide to go back, the hell breaks loose.
Expected behaviour
Only one song at the time.
Reproduction steps