Skip to content

Instantly share code, notes, and snippets.

@Metnew
Created January 13, 2018 05:49
Show Gist options
  • Select an option

  • Save Metnew/f3aecc9d20b596b8e3e836cda70210da to your computer and use it in GitHub Desktop.

Select an option

Save Metnew/f3aecc9d20b596b8e3e836cda70210da to your computer and use it in GitHub Desktop.
const mapStateToProps = (state) => {
 // BAD!!!
 const {something=768} = state.hello && state.hello.world
const {similar=0} = state.let.var && state.let.var.be && state.let.var.be.const
return {variable: similar + something}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment