arrow_back
Back

React events: synthetic events, handlers, and controlled inputs

Andrew Dorokhov Andrew Dorokhov schedule 1 min read
menu_book Table of Contents
function Form() {
  function handleSubmit(e) {
    console.log('Отправлена форма.');
  }

  return (
    <form onSubmit={handleSubmit}>
      <button type="submit">Отправить</button>
    </form>
  );
}

open_in_new Docs .

Passing arguments

<button onClick={(e) => this.deleteRow(id, e)}>Удалить строку</button>
<button onClick={this.deleteRow.bind(this, id)}>Удалить строку</button>
code

Need Help with Development?

Happy to help — reach out via the contacts or go straight to my Upwork profile.

work View Upwork Profile arrow_forward
Next Article

React fundamentals: JSX, the virtual DOM, and rendering

arrow_forward