Skip to content

Instantly share code, notes, and snippets.

@AshishKapoor
Created August 16, 2019 07:11
Show Gist options
  • Save AshishKapoor/6c21bea3d1c61f110d2318fbc922fd99 to your computer and use it in GitHub Desktop.
Save AshishKapoor/6c21bea3d1c61f110d2318fbc922fd99 to your computer and use it in GitHub Desktop.
How redux connect() works?
// 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