Skip to content

Instantly share code, notes, and snippets.

@Natedeploys
Last active October 17, 2018 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Natedeploys/523fe420bd0aa7f64b2597faba36e02c to your computer and use it in GitHub Desktop.
Save Natedeploys/523fe420bd0aa7f64b2597faba36e02c to your computer and use it in GitHub Desktop.
// Packages, Styling
import React, { Component } from "react";
import 'styles.css';
class SearchField extends Component {
render() {
return (
<div className="search">
<input
type="text"
placeholder="Add a keyword..."
value={this.props.keyword}
onChange={event => this.props.handleKeyword(event.target.value)}
/>
<button onClick={this.props.handleFetch}>Search</button>
</div>
);
}
}
export default SearchField;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment