Skip to content

Commit

Permalink
Update ExpoRouter.md (#163)
Browse files Browse the repository at this point in the history
Add onPress to renderItem because without it the ShowroomListItem gave the error ReferenceError: Property 'onPress' doesn't exist.
  • Loading branch information
mchisolm0 authored Jun 14, 2024
1 parent 9d66633 commit 116a23f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/recipes/ExpoRouter.md
Original file line number Diff line number Diff line change
Expand Up @@ -1585,7 +1585,7 @@ export default function DemoShowroomScreen() {
useCases: d.data.map((u) => u.props.name as string),
}))}
keyExtractor={(item) => item.name}
renderItem={({ item, index: sectionIndex }) => (
renderItem={({ item, index: sectionIndex, onPress }) => (
<ShowroomListItem {...{ item, sectionIndex, onPress }} />
)}
/>
Expand Down

0 comments on commit 116a23f

Please sign in to comment.