react-touch icon indicating copy to clipboard operation
react-touch copied to clipboard

Unknown prop `__passThrough` being added to Children

Open neeharv opened this issue 9 years ago • 3 comments

Sample code from our codebase

<Swipeable onSwipeLeft={this.moveCarouselPrevious} onSwipeRight={this.moveCarouselPrevious}>
	<ul className={`${this.props.listType}-list`} ref="list" style={computedStyle}>
		{Children}
	</ul>
</Swipeable>

neeharv avatar Nov 08 '16 15:11 neeharv

Same here

when I have the children elements in the Swipleable I get the error

<Swipeable config={swipe} onSwipeLeft={this.checkSwipe}>
    <div>...</div>
</Swipeable>

but when I move the children to a dumb component

checkSwipe() {
  console.log('swipe');
}

<Swipeable config={swipe} onSwipeLeft={this.checkSwipe}>
  <CommerceList />
</Swipeable>

It removes the error but I can't log the swipe event.

johhansantana avatar Dec 06 '16 16:12 johhansantana

+1

soriyath avatar Dec 20 '16 17:12 soriyath

Hey all, I haven't had a chance to look at this codebase all month since my wife and I have welcomed a newborn to the family. I'll try to make some time this week. PRs are welcome as well!

phil303 avatar Dec 20 '16 17:12 phil303