Skip to content

Instantly share code, notes, and snippets.

@aykutyaman
Last active August 23, 2016 09:46
Show Gist options
  • Save aykutyaman/a5bb5e328699a4e9b19f61e631bea794 to your computer and use it in GitHub Desktop.
Save aykutyaman/a5bb5e328699a4e9b19f61e631bea794 to your computer and use it in GitHub Desktop.
each call to Function.bind produces a new function
> console.log.bind(null, 'hi') === console.log.bind(null, 'hi')
false
> function(){console.log(‘hi');} === function(){console.log(‘hi');}
false
// New function each time
render() {
return <MyComponent onClick={() => this.setState(...)} />
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment