Skip to content

Commit

Permalink
fix: revert keyExtractor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tsdmrfth committed Apr 10, 2021
1 parent 683ebb8 commit 2d05820
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Steve.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { PanGestureHandler } from 'react-native-gesture-handler'
const { width: screenWidth } = Dimensions.get('window')
const containerPaddingHorizontal = 10

export const Steve = ({ data, renderItem, containerStyle }) => {
export const Steve = ({ data, renderItem, keyExtractor, containerStyle }) => {
const itemLayoutsCache = useRef({})
const [itemLayouts, setItemLayouts] = useState({})
const translateX = useSharedValue(0)
Expand Down Expand Up @@ -68,11 +68,11 @@ export const Steve = ({ data, renderItem, containerStyle }) => {

const Items = () => {
return data.map((item, index) => {
const itemKey = keyExtractor(item, index)
return (
<Item
key={index}
itemKey={index}
{...{ item, index }}/>
key={itemKey}
{...{ item, index, itemKey }}/>
)
})
}
Expand Down

0 comments on commit 2d05820

Please sign in to comment.