results from search input not rendering in browser
Closed this issue · 2 comments
sonnykbp commented
Hi James! I have a separate issue now where my results are not rendering in the browser but it appears in my console log...
Results.js
import React, { Component } from 'react';
// import Item from '../Item/Item'
class Results extends Component {
// constructor(props){
// super(props)
// this.state = {
// items: this.props.posts
// }
// }
itemList(post){
post.posts.map((item, index)=>{
console.log(item);
return item
})
}
render(){
let results = this.props.posts.map((post, indexKey) => {
return(
// <Item key={indexKey} item={this.itemList(post)} />
<div key={indexKey}>
<p>{this.itemList(post)}</p>
</div>
)
})
console.log(results);
return (
<div>
<p><a href="/">Go back to Search</a></p>
{results}
</div>
);
}
}
export default Results;
sonnykbp commented
superbuggy commented
Met in person; closing this issue for now.