Last active
August 23, 2016 09:46
-
-
Save aykutyaman/a5bb5e328699a4e9b19f61e631bea794 to your computer and use it in GitHub Desktop.
each call to Function.bind produces a new function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> 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