import React, { Component } from 'react';

class SearchBar extends Component {
	render() {
		return <input onChange={this.onInputChange} />;
	}

	onInputChange(event) {
		console.log(event.target.value);
	}
}

export default SearchBar;
import React, { Component } from 'react';

class SearchBar extends Component {
	render() {
		return <input onChange={event => console.log(event.target.value)} />;
	}

	// onInputChange(event) {
	// 	console.log(event.target.value);
	// }
}

export default SearchBar;
Comment out other function and place function inline to reduce code.
Comment out other function and place function inline to reduce code.
