Call external Javascript function from react components

前端 未结 4 1952
南旧
南旧 2020-12-08 14:32

Im not sure if this has been asked before or anybody has encountered the same issue on reactjs. So the scenario is like this, I have an index.html file that include

4条回答
  •  一生所求
    2020-12-08 14:35

    In index.html

    
    

    In your component

    componentWillMount() {
      window.test();
    }
    

提交回复
热议问题