Skip to content

Instantly share code, notes, and snippets.

@Jlevyd15
Created February 8, 2017 19:30
Show Gist options
  • Save Jlevyd15/ef96026cbe4fc2291a76d2909965ae92 to your computer and use it in GitHub Desktop.
Save Jlevyd15/ef96026cbe4fc2291a76d2909965ae92 to your computer and use it in GitHub Desktop.

ES6 object destructuring

const { store } = this.props 

Assigning a constant like this to the object on the right side will pull out the value for the key that has the same name as the variable (in this case store) and assigns it to the store variable. It's the equivalent to below syntax

const store = this.props.store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment