how are things being passed to onClick function
The component <temp>
probably has some code similar to
props.onClick("some-id");
Which in turn will call the onSelected
function with id: string = "some-id"
The component <temp>
probably has some code similar to
props.onClick("some-id");
Which in turn will call the onSelected
function with id: string = "some-id"