I'm new to React Native and I have a simple app which opens a Webview when a button is pressed. If the navigation state changes, I want to close the Webview. I'm able to know when to close it but unable to find how.

The doc does not mention any function to do it. What's the solution for this?

**version :** react-native: 0.47.2