|
|
|
|
|
by dounan
3313 days ago
|
|
> I guess they just call that function from within the Data component with the correct parameter. Yep > Is there a better way? We're experimenting with some other options internally. Once we have a better sense of what works best, we will post another article on our learnings :) |
|
return ( <Data value={d} index={i} deleteDataAt={deleteDataAt} /> );
Then your onClick in the child would be: onClick = (_e) => this.props.deleteDataAt(this.props.index);
Correct me if I'm missing anything!