Created
May 18, 2017 09:16
-
-
Save tecsyscom/8b5d3beaea76ccdc3310d07906faa9dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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