Created
August 13, 2022 06:30
-
-
Save kishoreandra/3b1933510310071cf8e7eca62ecd9d2c to your computer and use it in GitHub Desktop.
gristoi - curried function - handler
This file contains 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
myFunc(myVar){ | |
return function(event){... do stuff} | |
} | |
// or | |
const myFunc = (myVar) => (event) => {...do stuff} | |
// in child | |
<button onClick={myFunc('a')}>click me </button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment