Thanks this is great. I think this tricked me up in some existing code, when an Object is used as an object, and separately as key/values
const {
pageContext,
data: {
allMarkdownRemark: { edges }
}
} = this.props;
const { data: { allMarkdownRemark } } = this.props;...// from: this.props.data.allMarkdownRemark.edges
// to : edges// from: this.props.data.allMarkdownRemark;
// to: allMarkdownRemark
Heck, I could clean it up a little more:
const { data: { allMarkdownRemark } } = this.props;
const {
pageContext,
allMarkdownRemark: { edges }
} = this.props;