I am trying to figure out how to call a function which has a param, I am using arrow functions.
Just an example:
_openAddDealer = (dealerInfo) => {
console.log(dealerInfo);
}
And I need to call that from a button
<FloatingActionButton onClick={this._openAddDealer}>
For the rest of the functions I don't need any bind to this or something similar. So, what can I do to something like this:
<FloatingActionButton onClick={this._openAddDealer(dealerInfo)}>
I tried like that but the function is being called when the app loads and not when the button is pressed.
dealerInfocoming from where you call the function?