Countdown timer in React.js Code is a countdown timer.

Should I keep this update function separate as is or can I save 3 lines of code and embed this.setState({newDeadline: event.target.value}) directly in the callback function below? eg. onChange={event => this.setState({newDeadline: event.target.value}} 

import React, { Component } from 'react';
import './App.css';
import Clock from './Clock';
import {FormGroup, FormControl, Button} from 'react-bootstrap';

class App extends Component {
  constructor(props) {
    super(props);
    this.state = {
      deadline: 'December 25 2017',
      newDeadline: ''
    }
  }

  updateDeadline() {
    if (isNaN(Date.parse(this.state.newDeadline)) || this.state.newDeadline === '') {
      this.setState({deadline: this.state.deadline});
    } else {
      this.setState({deadline: this.state.newDeadline})
    }
  }

  updateNewDeadline(event) {
    this.setState({newDeadline: event.target.value})
  }

  render() {
    return (
      &lt;div className="app"&gt;
        &lt;div className="app-title"&gt;Countdown To {this.state.deadline}&lt;/div&gt;
        &lt;Clock deadline={this.state.deadline} /&gt;
        &lt;form className="app-form"&gt;
          &lt;FormGroup&gt;
            &lt;FormControl className="deadline-input"
              placeholder='Enter a new date'
              onChange={event =&gt; this.updateNewDeadline(event)} 
            /&gt; 
            &lt;Button bsStyle="primary" block onClick={() =&gt; this.updateDeadline()}&gt;Submit&lt;/Button&gt;
          &lt;/FormGroup&gt;
        &lt;/form&gt;
      &lt;/div&gt;
    )
  }
}

export default App;
My two takes in this. In you example your are creating a new event handler on each render, so if you want to do it that way you would for sure want to bind the event handlers in the constructor. But if your never re-using them and it doesent clutter up the JSX "markup" to much (e.g. just a clean setState) I am always using the inline setState like you suggested:

import React, { Component } from 'react';
import './App.css';
import Clock from './Clock';
import {FormGroup, FormControl, Button} from 'react-bootstrap';

class App extends Component {
  constructor(props) {
    super(props);

    //Bound event handlers
    this.updateNewDeadline = this.updateNewDeadline.bind(this); 
    this.updateDeadline = this.updateDeadline.bind(this);

    this.state = {
      deadline: 'December 25 2017',
      newDeadline: ''
    }
  }

  updateDeadline() {
    if (isNaN(Date.parse(this.state.newDeadline)) || this.state.newDeadline === '') {
      this.setState({deadline: this.state.deadline});
    } else {
      this.setState({deadline: this.state.newDeadline})
    }
  }

  updateNewDeadline(event) {
    this.setState({newDeadline: event.target.value})
  }

  render() {
    return (
      &lt;div className="app"&gt;
        &lt;div className="app-title"&gt;Countdown To {this.state.deadline}&lt;/div&gt;
        &lt;Clock deadline={this.state.deadline} /&gt;
        &lt;form className="app-form"&gt;
          &lt;FormGroup&gt;
            &lt;FormControl className="deadline-input"
              placeholder='Enter a new date'
              onChange={this.updateNewDeadline} 
            /&gt; 
            &lt;Button bsStyle="primary" block onClick={this.updateDeadline}&gt;Submit&lt;/Button&gt;
          &lt;/FormGroup&gt;
        &lt;/form&gt;
      &lt;/div&gt;
    )
  }