Created
August 16, 2019 07:11
-
-
Save AshishKapoor/6c21bea3d1c61f110d2318fbc922fd99 to your computer and use it in GitHub Desktop.
How redux connect() works?
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
// Reference: https://stackoverflow.com/a/18234552/7393218 | |
const message=[]; | |
const say = (someString) => { | |
if (someString) { | |
message.push(someString); | |
return say | |
} | |
console.log(message.join(' ')); | |
} | |
say('hello')('world')() /* Outputs: "Hello world" */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment