@rescript-react-native/flash-list
v2.0.0
Published
ReScript bindings for @shopify/flash-list
Readme
@rescript-react-native/flash-list
ReScript bindings for
flash-list.
Exposed as FlashList module.
@rescript-react-native/flash-list X.y.* means it's compatible with
@shopify/flash-list X.y.*
Installation
When
@shopify/flash-list
is properly installed & configured by following their installation instructions,
you can install the bindings:
npm install @rescript-react-native/flash-list
# or
yarn add @rescript-react-native/flash-list@rescript-react-native/flash-list should be added to bs-dependencies in your
rescript.json:
{
//...
"bs-dependencies": [
"@rescript/react",
"rescript-react-native",
// ...
+ "@rescript-react-native/flash-list"
],
//...
}Usage
Methods
<FlashList>
open ReactNative;
@react.component
let make = () => {
<FlashList
data={[{"id": "1", "name": "Foo"}]}
keyExtractor={(item, _) => item["id"]}
renderItem={({item}) =>
<View>
<Text> {item["name"]->React.string} </Text>
</View>}
/>
}Changelog
Check the changelog for more informations about recent releases.
Contribute
Read the contribution guidelines before contributing.
Code of Conduct
We want this community to be friendly and respectful to each other. Please read our full code of conduct so that you can understand what actions will and will not be tolerated.
