Hi @Red-Bog,
These are function factories returning an event handler function. So your second example needs to be modified to
onClick={() => moveUp(path,index)()}
to work. Your third example onClick={customFunction(path,index)}
can work, depending on what you do in customFunction
.