krish_10
KPCKevin Powell - Community
•Created by krish_10 on 7/30/2023 in #front-end
react state not updating inside a hook (useSound)
I'm trying to add a loop feature on a spotify clone where I hold a state isLoop and control it using a button. however it is not reflected inside a method of a hook 'useSound' which uses howler.js.
I've attached the code as file.
There onend method of useSound hook doesnt gets the updated state.
1 replies