D
Size: a a a
D
AM
D
AM
AH
<SideSwipe
index={this.state.currentIndex}
itemWidth={CustomComponent.WIDTH}
style={{ width }}
contentOffset={contentOffset}
data={{id: 1, name: 'test'}}
onIndexChange={index =>
this.setState(() => ({ currentIndex: index }))
}
renderItem={({ itemIndex, currentIndex, item, animatedValue }) => (
<CustomComponent
{...item}
index={itemIndex}
currentIndex={currentIndex}
animatedValue={animatedValue}
/>
)}
/>
class CustomComponent extends Component {
static WIDTH = 400
componentDidMount(): void {
console.log(this.props.index)
}
render(): React.ReactNode {
return (
<View>
<Text>ssdsdsdsd</Text>
</View>
)
}
}
D
AM
AM
D
D
D
ДА
D
AM
AH
AM
AM
D
D