Commit 1a7aea1
authored
Do not import
## Description
Currently in `GestureComponents.tsx` we import `NativeWrapperProps` as
`type`. However, in `FlatList` we need this as value to be able to
[iterate over
values](https://github.com/software-mansion/react-native-gesture-handler/blob/3918d8ae52020d6b64f31c2ae0b06b19b284c699/packages/react-native-gesture-handler/src/v3/components/GestureComponents.tsx#L136).
When imported as type, it crashes.
## Test plan
<details>
<summary>Tested on the following code:</summary>
```tsx
import { Pressable as RNPressable, Text } from 'react-native';
import {
GestureHandlerRootView,
FlatList,
Pressable,
} from 'react-native-gesture-handler';
export default function TestComponent() {
return (
<GestureHandlerRootView>
<Text>RN</Text>
<FlatList
horizontal
data={[1, 2, 3, 4, 5]}
renderItem={() => (
<RNPressable
style={{
borderWidth: 5,
width: 50,
height: 50,
borderColor: 'black',
}}
/>
)}
/>
<Text>RNGH</Text>
<FlatList
horizontal
data={[1, 2, 3, 4, 5]}
renderItem={() => (
<Pressable
style={{
borderWidth: 5,
width: 50,
height: 50,
borderColor: 'blue',
}}
/>
)}
/>
</GestureHandlerRootView>
);
}
```
</details>NativeWrapperProps as type (#4030)1 parent bfb24af commit 1a7aea1
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
0 commit comments