'How to call a function with a specific argument from another file react native

I have a React Native application that has a component called "Reader" that creates a WebView inside it. This component also has a function that takes that webview as an argument like so that injects event listeners into the webview

injectListener(WebView);

The problem is that I have another component in my application that needs to call the injectListener function from with the WebView from the "Reader" component. How would I go about achieving this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source