I have been searching for a while for a good explanation so its all clear to me. Example:
this.onDeleteHandler(index)}/>
this.onDeleteHandler(index)}/>
It passes anonymous function as a callback which - when clicked - triggers onDeleteHandler
with extra index
parameter (which has to be defined in the scope before).
It passes result of onDeleteHandler()
as a callback - probably a bad idea - onDeleteHandler
function has to return another function that will be invoked on click.
this.nameChangedhandler(event, person.id)} />
Looks invalid - will result with syntax error.
Similar to the first example but doesn't take custom parameters. Default click event will be passed as a first argument for onDeleteHandler