score:0

you have a curried function there (it takes multiple sets of arguments). in your case data and event.

you can invoke it like this with both particular sets of arguments at once: handleportfoliochange(data)(event) (instead of handleportofoliochange(data,e)).

maybe it's of help to mention that you can also define a more narrow function with a particular data object to use every time to only have to vary the event like this:

//say, you had data-object that doesn't change in this scope like constantdata
constantdata = {
"some": 1,
"data": 2,
"here": "idk"
}

// then you could define a more particular function that handleportfoliochange, by passing //only the first argument to the general function:
handleconstantportfoliodata = handleportfoliodata(constantdata);

you could then invoke it anywhere but only worry about the event:

...onchange={e => this.handleconstantportfoliodata(e)}...

Related Query

More Query from same tag