Last active
April 16, 2022 12:25
-
-
Save FSPinho/72254421c0deb533c7cd8f0ab0d69e66 to your computer and use it in GitHub Desktop.
Speedy List Simple Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { SpeedyList, SpeedyListItemMeta, SpeedyListItemRenderer } from "react-native-speedy-list" | |
const [items] = useState<Array<User>>([{ id: 0, name: "User 001" }, ...]); | |
const itemRenderer = useCallback( | |
({ item, index, height }: SpeedyListItemProps<User>) => { | |
return <Text>{item.name}</Text> | |
}, | |
[] | |
) | |
<SpeedyList<User> | |
items={items} | |
itemRenderer={itemRenderer} | |
itemHeight={42} | |
itemKey={"id"} /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment