2017-10-19 15 views
1

私はPV (protein viewer)をReactと統合しようとしていますが、そうすることはできません。検索を試みました。私はこれを最初にやっています。私はガイドhereに従ったが、私はまだそれを動作させることはできません。PV(protein viewer)とReactとの統合

これまでのところ私が思いついたのはここです。

import React, { Component } from 'react' 

class pv extends Component { 

    componentDidMount() { 
    this.el = this.pvDiv 
    this.viewer = pv.Viewer(this.el, { width : 'auto', height : 'auto', antialias : true }) 
    this.viewer.on('viewerReady', function() { 
     console.log('ready!') 
    }) 
    } 

    render(){ 
    return(
     <div> 
      <div ref={el => this.pvDiv = el}/> 
     </div> 
    ); 
    } 

} 

export default pv; 
+0

は 'console.log'ロギングですか? 'pv'オブジェクトをどこにでもインポートしているのですか、それとも'

関連する問題