content: import React, { Component } from 'react';
  import { connect } from 'react-redux';
  import { fetchMovie } from '../actions';
  
  class Searchbar extends Component {
  	constructor(props){
  		super(props);
  		this.state = {term: ''}
  	};
  	handleChange = (e) => {
  		this.setState({term: e.target.value});
  	};
  	handleSubmit = (e) => {
  		e.preventDefault();
  		const term = this.state.term;
  		if(this.state.term !== ''){
  			this.props.fetchMovie(term);
  		}
  		this.setState({'term': ''});
  	};
  	render(){
  		return(
  			<div className="searchbar-wrapper">
  				<form className="input-group" onSubmit={this.handleSubmit}>
  					<input
  						placeholder="Search for your new favorite movie..."
  						className="form-control" 
  						type="text" 
  						value={this.state.term} 
  						onChange={this.handleChange} 
  					/>
  					<span className="input-group-btn">
  						<button type="submit" className="btn btn-default">Search</button>
  					</span>
  				</form>
  			</div>
  		);
  	};
  };
  
  export default connect(null, {fetchMovie})(Searchbar);