JedWatson / react-tappable

Tappable component for React
http://jedwatson.github.io/react-tappable/
MIT License
862 stars 90 forks source link

[ASK] Passing data when event onPress Tappable triggered #89

Closed rezadhah closed 7 years ago

rezadhah commented 7 years ago

Hello, i'm trying to pass data from my component to event onPress inside Tappable tag.

renderList = (list.queue.map((data, i) =>
        (<Tappable pressDelay={delay} onPress={this.handleTapEvent.bind(this, data)} key={i}>
          <Link to={`/list/${value.listId}`} style={{ textDecoration: 'none' }}>value.name</Link>
        </Tappable>)
));

but i got warning message from eslint. it says "jsx props should not use .bind" so how do i bind data to this event onPress? thank you for your attention.