How to replicate onDidBlur or onWillBlur with React Navigation 5?
问题 As they point out in the docs, they've gotten rid of the 4 navigation event listeners and instead decided to use Lifecycle events. But the problem I'm running into with React Navigation 5 is that the blur event doesn't work as I need it to! Before, I could add an onWillBlur listener, and do stuff when the user temporarily leaves (not closes) the app (such as close a socket connection, and then reopen it when the user reenters the app). How can I replicate the onWillBlur or onDidBlur events