CodeZeus
1 min readDec 6, 2018

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;

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

CodeZeus
CodeZeus

Written by CodeZeus

Software Developer Jesse Boyer, known more by JREAM. Hobbyist and Professional Developer.

Responses (1)

can you explain whats going on lol. React is firkin crazy. :p

--