Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from "react";
- export default class DelayedBinding extends React.Component {
- constructor() {
- this.state = {
- name: "Mayank"
- }
- }
- handleButtonClick = () => {
- alert("Button Clicked: " + this.state.name)
- }
- render() {
- return (
- <>
- <input type="button" value="Click" onClick={this.handleButtonClick} />
- </>
- )
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement