How do I center an item within a React Native ListView?
问题 I'm trying to center an item within a horizontal listView when selected. My current strategy is to first measure the item and scroll to the x coordinates of the referenced item within the view. Currently, any time I press an item ListView scrolls to the very end x: 538 Is there an easier way to implement this while keeping the code stateless / functional? const ItemScroll = (props) => { const createItem = (obj, rowID) => { const isCurrentlySelected = obj.id === props.currentSelectedID