Improve post list structure
adriantoine opened this issue · 0 comments
adriantoine commented
For now when you want to render a post list, it looks like:
<ul>
{this.props.posts.edges.map(edge =>
<li key={edge.node.meta.slug}>{edge.node.meta.title}</li>
)}
</ul>
and those edges
, node
long structures annoys me.
You should be able to iterate through an array this.props.bloql.posts
and get each post there.
And for Post
, parameters should be available in this.props.bloql.post
not to pollute the normal props object, in case someone wants to pass a post
prop, it shouldn't be overriden.