Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

display text on button click react

class App extends Component{

  onButtonClickHandler = () => {
    window.alert('Hi')
  };

  render(){ 
    return(<div className="App">
      <button onClick={this.onButtonClickHandler}>Enter</button>
    </div>);

  }
}
Source by goonlinetools.com #
 
PREVIOUS NEXT
Tagged: #display #text #button #click #react
ADD COMMENT
Topic
Name
2+2 =