Posted On: Feb 22, 2018
Below is a simple example of how to listen for a click event in react
import React, { Component } from 'react'; class ShowAlert extends Component { showAlert() { alert("Im an alert"); } render() { return ( <button onClick={this.showAlert}>show alert </button> ); } } export default ShowAlert;
Never Miss an Articles from us.
React js is javascript based UI Library developed at Facebook, to create an interactive, stateful & reusable UI com..
Advantages of React JsReact.js is extremely efficient: React.js creates its own virtual DOM where your components act..
React Components let you split the UI into independent, reusable pieces, and think about each piece in isolation.Concep..