title: How to use vanilla javascript inside Reactjs component?
body: <p>I am using chartist.js and I am using the chartist within reactjs component.
  I am referring this <a href="http://gionkunz.github.io/chartist-js/examples.html#simple-pie-chart" rel="nofollow noreferrer">http://gionkunz.github.io/chartist-js/examples.html#simple-pie-chart</a></p>
  
  <p>chartist.js:</p>
  
  <pre><code>var Chartist = {
      version:'0.9.5' 
  }
  
  (function (window, document, Chartist) {
  
  var options = {
    labelInterpolationFnc: function(value) {
      return value[0]
    }
  };
  
  var responsiveOptions = [
    ['screen and (min-width: 640px)', {
      chartPadding: 30,
      labelOffset: 100,
      labelDirection: 'explode',
      labelInterpolationFnc: function(value) {
        return value;
      }
    }],
    ['screen and (min-width: 1024px)', {
      labelOffset: 80,
      chartPadding: 20
    }]
  ];
  
  })();
  </code></pre>
  
  <p>Reactjs component:</p>
  
  <pre><code>import React, { Component } from 'react';
  
  var data = {
    labels: ['Bananas', 'Apples', 'Grapes'],
    series: [20, 15, 40]
  };
  
  showPieChart(data){
       new Chartist.Pie('.ct-chart', data, options, responsiveOptions);
  }
  
  class Chart extends Component {
  
    render(){
      return(
        &lt;div&gt;
            &lt;div className="center"&gt;
                {showPieChart}
            &lt;/div&gt;
        &lt;/div&gt;
  
      )}
  
  }
  
  export default Chart;
  </code></pre>
  
  <p>Nothing is displayed on web page. How can I access vanilla javascript inside react component.</p>