Tag Archives: React js onClick can't pass value to method

Easy Way Use an arrow function: This will create a new function that calls handleSort with the right params. Better Way Extract it into a sub-component. The problem with using an arrow function in the render call is it will create a new function every time, which ends up causing unnee...