class Pop extends Component{
constructor(props){
super(props);
window.renderCustomMView = this.renderCustomMView.bind(this);
}
renderCustomMView(){
....some code
}
}
const Popup = ()=>{
window.renderCustomMView();
}
export {Popup};
import {Popup} from 'path/to/parent';
class Video extends Component{
constructor(props){
super(props)
}
callingFunction(){
Popup();
}
}
Когда я импортирую Popup, он импортируется. Затем я вызываю эту функцию, она говорит, что window.renderCustomMView не является функцией.