In the ContentList component ContentList it should use this.props.filterText , which will take an input value and compare with your data. When the input value changes, React will redisplay the component containing this.state.filterText . You can use the map or filter method to filter it. Here is an example:
var ContentList = React.createClass({ render: function() { var commentNodes = this.props.data.map(function(content) { if(content.description === this.props.filterText){ <-- this makes the filter work ! return <ItemRow title={content.owner.login} body={content.description} slug={content.owner.avatar_url}></ItemRow>} }) return ( <div className='contentList'> {commentNodes} </div> ) } })
source share