title: Access props outside class
body: <p>I'm using <code>react-bootstrap-table</code> with <code>cellEdit</code> enabled. It is possible to use a callback function in <code>react-bootstrap-table</code> after the cell has been edited. I've named the callback function <code>onAfterSaveCell</code>. The updated row in table will be saved to a variable called <code>row</code>. I would like to send <code>row</code> to an action creator called <code>pushData</code> that accepts <code>row</code> as an input. My code looks like this.</p>
  
  <pre><code>function onAfterSaveCell(row, cellName, cellValue){
    this.props.pushData(row);
  } 
  
  const cellEditProp = {
    mode: "click",
    blurToSave: true,
    afterSaveCell: onAfterSaveCell
  };
  
  class Feature extends Component {
    componentWillMount() {
      this.props.fetchMessage();
    }
  
    render() {
      if (!this.props.message) return null
  
      return (
      &lt;div&gt;
        &lt;BootstrapTable
                data={this.props.message}
                cellEdit={cellEditProp}
                &gt;
          &lt;TableHeaderColumn dataField="ccyCode" isKey={true} dataSort={true}&gt;Valutakod&lt;/TableHeaderColumn&gt;......
  </code></pre>
  
  <p>When I run the code I the error <code>Uncaught TypeError: Cannot read property 'props' of undefined</code>. Which I think is due to that <code>props</code> is not available outside the <code>class Feature</code>. I've tried to move in the <code>onAfterSaveCell</code> function and <code>cellEditProp</code> in to <code>class Feature</code> but this give me a compilation error. How can I make <code>props</code> accessible outside the <code>class Feature</code> or should this be solved in some other way? </p>