Sagiv Ben Giat
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?

    Sagiv Ben Giat

    Written by

    https://debuggr.io

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade