Greeting.jsx

Home   »   Greeting.jsx

import React from "react";
import Row from "./row";

export default class Greeting extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      name: "Mary",
      surname: "Poppins",
      email: "[email protected]",
      country: "wkwk land",
    };
    this.handleNameChange = this.handleNameChange.bind(
      this
    );
    this.handleSurnameChange = this.handleSurnameChange.bind(
      this
    );
    // more binding...
  }

  handleNameChange(e) {
    this.setState({ name: e.target.value });
  }

  handleSurnameChange(e) {
    this.setState({ surname: e.target.value });
  }
  
  // more handler and component return...
}

Leave a Reply

Your email address will not be published.