I need to integrate a non-React app into my React app. I'm thinking of doing it through an iframe. They both would be living on my domain. Is there any way to pass functions into an iframe? Say I want the app inside iframe to call a React function that would show a file save modal. So I imagine something like this:
const MyComponent = (props) => {
const onclick = (type) => {
// ... handle calls depending on arguments...
}
return (
<iframe onClick={onclick} ... />
)
}
Perhaps there's a way to achieve that by passing accessing the parent through window.parent? Any other ideas?