Need help !
How to stop browser to move to other route until a condition is met ?
In my case, I am loading a unity build using react-unity-webgl on my react component in a canvas.
I gotta fire an event to unity before leaving the page to unload and logout that user from unity game and wait until that logout and unload process is finished, Once unloading process is finished, user should be redirected to where he had pressed before.
Using React JS