Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react prototype function

class Foo extends Component {
  handleClick() {
    console.log('Clicado');
  }
  render() {
    return <button onClick={this.handleClick.bind(this)}>Clique em mim!</button>;
  }
}
Source by pt-br.reactjs.org #
 
PREVIOUS NEXT
Tagged: #react #prototype #function
ADD COMMENT
Topic
Name
6+3 =