Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tecsyscom/8b5d3beaea76ccdc3310d07906faa9dd to your computer and use it in GitHub Desktop.
Save tecsyscom/8b5d3beaea76ccdc3310d07906faa9dd to your computer and use it in GitHub Desktop.
const SearchResults = React.createClass({
propTypes: {
results: React.PropTypes.array
},
getDefaultProps () {
return { results: [] }
},
render () {
return (
<div className="search_results">
<hr />
<ul>
{ this.props.results.map((result) => {
return <li key={ result._id }>{ result._source.text }</li> }) }
</ul>
</div>
)
}
})
/// same as
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment