title: Update State of React Component from ag-grid Custom Renderer
body: <p>I need to update the state of React Component from Custom Rendered Component of Ag-grid. I hae tried to setState() in custom component but it says setState() is not a function
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>// function to act as a class
  
  //https://www.ag-grid.com/javascript-grid-cell-rendering-components/
  
  function editCellRenderer () {}
  
  // gets called once before the renderer is used
  
  editCellRenderer.prototype.init = function(params) {
  
      // create the cell
  
      this.eGui = document.createElement('div');
  
      let row = params.data;
  
      let className = 'edit-btn-style';
  
      this.eGui.innerHTML =  '&lt;span class="my-css-class"&gt;&lt;div class="edit-button '+className+'" title="'+row.id+'"&gt;\
      &lt;a target="_blank" href="URL='+row.id+'" &gt;\
      &lt;i class="fa fa-edit fa-1x not-selectable-element"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/div&gt;
  
  &lt;/span&gt;';
  };
  
  // gets called once when grid ready to insert the element
  editCellRenderer.prototype.getGui = function() {
      return this.eGui;
  };
  
  // gets called whenever the user gets the cell to refresh
  editCellRenderer.prototype.refresh = function(params) {
      // set value into cell again
      // return true to tell the grid we refreshed successfully
      return true;
  };
  
  // gets called when the cell is removed from the grid
  editCellRenderer.prototype.destroy = function() {
      // do cleanup, remove event listener from button
  };
  
  
  //This is the way i am initializing AgGridReact in Reactjs component.
  &lt;AgGridReact
  columnDefs={this.state.columnDefs}
  defaultColDef={this.state.defaultColDef}
  rowData={jobs_reindexed}
  components={this.state.components}
  frameworkComponents={this.state.frameworkComponents}
  onGridReady={this.onGridReady}
  /&gt;</code></pre>
  </div>
  </div>
  </p>