javascript - How do I access a component's prop value from within an event handler? -


i have simple component event handler function. how access props value? doesn't epecting.

class example extends react.component {      handleclick( event, id ) {         console.log( id );         console.log( this.props );     } 

.....

return (     <tr onclick={this.handleclick}>         <th scope="row"> 

.....

return (     <tr onclick={this.handleclick.bind(this)}>         <th scope="row"> 

Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -