When using React, you have 2 methods to cleanup side effects from components:
- useEffect’s cleanup function
When a window in overwolf is closed, the window is closed directly without running this react flow
- Create a simple OW app using react (“Hello world” window)
- Add a
console.logto one of the mounted components’s
- Observe the logs.
At this point, you’ll notice that the log is written (as the method did not run)
We have some functionalities that don’t run due to that and it may cause data corruption/ missing analytics
The closest workaround we have involves registering to
beforeunload, which means potentially running these flows twice or more sometimes.