1

In JavaScript, I want to reference the external object.

More specifically, I have the following React code. Within the nesting I want to reference this.props.

var Table = React.createClass({
  componentDidMount: function() {
    buttons: [{
      text: '',
      actions: function(e) {
      //HERE I want to reference this.props
      }   
     },
    //some other elements
    ]
  //some other code
  }

});

How can I reference this.props of Table from within the actions function?

bsky
  • 17,746
  • 43
  • 135
  • 250

0 Answers0