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;
import React, { Component } from 'react';

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

		this.state = { term: '' };
	}

	render() {
		return (
			<div>
				<input onChange={event => this.setState({ term: event.target.value })} />
			</div>
		);
	}
}

export default SearchBar;
Add a constructor method and add a property of term for the state, add a function as an event handler onchange that sets the state for term as the inputs value.
Add a constructor method and add a property of term for the state, add a function as an event handler onchange that sets the state for term as the inputs value.
