Aug 8, 2017 · 1 min read
Hi Cory, great overview of these patterns.
I thought of another pattern, mostly for passing an argument to the handler.
The pattern is use function currying:
handleChange = param => e => {
// param is the argument you passed to the function
// e is the event object that returned
};And use it like this:
<input
type="text"
onChange={this.handleChange(someParam)}
/>You can see a full example i wrote here
What do you think about it?
