Skip to content

Commit 936b578

Browse files
committed
1.7.0
1 parent 02e794f commit 936b578

9 files changed

+10243
-2097
lines changed

CHANGELOG.md

+3-15
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
1-
# Changelog of `@rescript-react-native/__template__`
1+
# Changelog of `@rescript-react-native/flash-list`
22

3-
## X.Y.Z - 20YY-MM-DD
3+
## 1.7.0 - 2025-04-19
44

5-
Short & concise description
6-
7-
### 💥 Breaking changes
8-
9-
- Something, in [1234567](<link to commit on github>) by @<usename>
10-
11-
### 🐛 Fixes
12-
13-
- Something else, in [1234567](<link to commit on github>) by @<usename>
14-
15-
### Internal changes
16-
17-
(If worth mentioning)
5+
- initial binding by @freddy03h

README.md

+29-46
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,31 @@
1-
## How to use this template
2-
3-
- ⚠️ **Don't fork this repository.** Use the "Use this template" green GitHub
4-
button.
5-
- Put your bindings in `src/ReactNativeXxxxxxxxxx` & rename accordingly or use
6-
`rescript.json` `"namespace"` field (more on this below),
7-
- Update all occurences of
8-
9-
- `@rescript-react-native/__template__`
10-
- `https://github.com/rescript-react-native/__template__`
11-
- `__template__`
12-
- `react-native-XXXXXXXXXX`
13-
- `https://github.com/OWNER/react-native-XXXXXXXXXX`
14-
- `ReactNativeXxxxxxxxxx`. If you have more than a file exposed, you should
15-
consider using ReScript custom namespace by adjusting `rescript.json`
16-
and adding a `"namespace": "react-native-something"` (note that it will be
17-
converted to `ReactNativeXxxxxxxxxx`)
18-
19-
- Add your `react-native-XXXXXXXXXX` (adjusted) in `peerDependencies`
20-
& `devDependencies` section
21-
- Adjust the changelog (and/or clean it)
22-
- Remove this part ⬆ & keep everything below ⬇
1+
# `@rescript-react-native/flash-list`
232

24-
---
25-
26-
# `@rescript-react-native/__template__`
27-
28-
[![Build Status](https://github.com/rescript-react-native/__template__/workflows/Build/badge.svg)](https://github.com/rescript-react-native/__template__/actions)
29-
[![Version](https://img.shields.io/npm/v/@rescript-react-native/__template__.svg)](https://www.npmjs.com/@rescript-react-native/__template__)
3+
[![Build Status](https://github.com/rescript-react-native/flash-list/workflows/Build/badge.svg)](https://github.com/rescript-react-native/flash-list/actions)
4+
[![Version](https://img.shields.io/npm/v/@rescript-react-native/flash-list.svg)](https://www.npmjs.com/@rescript-react-native/flash-list)
305
[![ReScript Forum](https://img.shields.io/discourse/posts?color=e6484f&label=ReScript%20Forum&server=https%3A%2F%2Fforum.rescript-lang.org)](https://forum.rescript-lang.org/)
316

327
[ReScript](https://rescript-lang.org) bindings for
33-
[`react-native-XXXXXXXXXX`](https://github.com/OWNER/react-native-XXXXXXXXXX).
8+
[`flash-list`](https://github.com/Shopify/flash-list).
349

35-
Exposed as `ReactNativeXxxxxxxxxx` module.
10+
Exposed as `FlashList` module.
3611

37-
`@rescript-react-native/__template__` X.y.\* means it's compatible with
38-
`react-native-XXXXXXXXXX` X.y.\*
12+
`@rescript-react-native/flash-list` X.y.\* means it's compatible with
13+
`@shopify/flash-list` X.y.\*
3914

4015
## Installation
4116

4217
When
43-
[`react-native-XXXXXXXXXX`](https://github.com/OWNER/react-native-XXXXXXXXXX)
18+
[`@shopify/flash-list`](https://github.com/Shopify/flash-list)
4419
is properly installed & configured by following their installation instructions,
4520
you can install the bindings:
4621

4722
```console
48-
npm install @rescript-react-native/__template__
23+
npm install @rescript-react-native/flash-list
4924
# or
50-
yarn add @rescript-react-native/__template__
25+
yarn add @rescript-react-native/flash-list
5126
```
5227

53-
`@rescript-react-native/__template__` should be added to `bs-dependencies` in your
28+
`@rescript-react-native/flash-list` should be added to `bs-dependencies` in your
5429
`rescript.json`:
5530

5631
```diff
@@ -60,25 +35,33 @@ yarn add @rescript-react-native/__template__
6035
"@rescript/react",
6136
"rescript-react-native",
6237
// ...
63-
+ "@rescript-react-native/__template__"
38+
+ "@rescript-react-native/flash-list"
6439
],
6540
//...
6641
}
6742
```
6843

6944
## Usage
7045

71-
### Types
72-
73-
#### `ReactNativeXxxxxxxxxx.t`
74-
75-
...
76-
7746
### Methods
7847

79-
#### `ReactNativeXxxxxxxxxx.method`
80-
81-
...
48+
#### `<FlashList>`
49+
50+
```rescript
51+
open ReactNative;
52+
53+
@react.component
54+
let make = () => {
55+
<FlashList
56+
data={[{"id": "1", "name": "Foo"}]}
57+
keyExtractor={(item, _) => item["id"]}
58+
renderItem={({item}) =>
59+
<View>
60+
<Text> {item["name"]->React.string} </Text>
61+
</View>}
62+
/>
63+
}
64+
```
8265

8366
---
8467

0 commit comments

Comments
 (0)