I need to attach a function to a specific button. Actually a have lots of them, 2 per each element. And I just don't know how to pass variable to function not triggering it when rendering. Any one knows how?)
Task text={data.text} onClick={deleteItem(store, index)}
The function is to delete element from array