manniru
5/22/2018 - 2:55 PM

ReactSimple.js

import React, { Component } from 'react';

export default class Pdf extends Component {

  constructor(props) {
    super(props);
    this.state = {
      value: null,
    };
  }

  handleClick = (e, id) => {
    e.preventDefault();
    console.log(id);
    console.log(+ new Date());
  }


  render() {
    return (
      <div>
          <button id="btn1" onClick={((e) => this.handleClick(e, 'btn1'))} >Submit1</button>
      </div>
    );
  }
}