这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ Nothing makes it into Ignite unless it's been proven on projects that Infinite R
| Jest | Test Runner | v29 | Standard test runner for JS apps |
| date-fns | Date library | v4 | Excellent date library |
| react-native-keyboard-controller | Keyboard library | v1 | Great keyboard manager library |
| FlashList | FlatList replacement | v1 | A performant drop-in replacement for FlatList |
| react-native-edge-to-edge | UI library | v1 | Enables edge-to-edge in Android |
| Reactotron RN | Inspector/Debugger | v5 | JS debugging |
| Maestro | Testing Framework | | Automate end-to-end UI testing |
Expand Down
42 changes: 0 additions & 42 deletions boilerplate/app/components/ListView.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion boilerplate/app/i18n/demo-ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export const demoAr: DemoTranslations = {
nestedChildren2: "Ullamco cupidatat officia exercitation velit non ullamco nisi..",
},
listIntegration: {
name: "دمج مع/ FlatList & FlashList",
name: "دمج مع/ FlatList",
description: "يمكن دمج المكون بسهولة مع واجهة القائمة المفضلة لديك",
},
styling: {
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/i18n/demo-en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export const demoEn = {
nestedChildren2: "Ullamco cupidatat officia exercitation velit non ullamco nisi..",
},
listIntegration: {
name: "Integrating w/ FlatList & FlashList",
name: "Integrating w/ FlatList",
description: "The component can be easily integrated with your favorite list interface.",
},
styling: {
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/i18n/demo-es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export const demoEs: DemoTranslations = {
nestedChildren2: "Ullamco cupidatat officia exercitation velit non ullamco nisi..",
},
listIntegration: {
name: "Integración con FlatList y FlashList",
name: "Integración con FlatList",
description:
"El componente puede ser fácilmente integrado con tu interfaz de lista preferida.",
},
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/i18n/demo-fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export const demoFr: DemoTranslations = {
nestedChildren2: "Ullamco cupidatat officia exercitation velit non ullamco nisi..",
},
listIntegration: {
name: "Intégration avec FlatList & FlashList",
name: "Intégration avec FlatList",
description:
"Le composant peut être facilement intégré avec votre interface de liste préférée.",
},
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/i18n/demo-hi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export const demoHi: DemoTranslations = {
nestedChildren2: "Ullamco cupidatat officia exercitation velit non ullamco nisi..",
},
listIntegration: {
name: "FlatList और FlashList के साथ एकीकरण",
name: "FlatList के साथ एकीकरण",
description:
"कंपोनेंट को आसानी से आपके पसंदीदा सूची इंटरफेस के साथ एकीकृत किया जा सकता है।",
},
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/i18n/demo-ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export const demoJa: DemoTranslations = {
nestedChildren2: "Ullamco cupidatat officia exercitation velit non ullamco nisi..",
},
listIntegration: {
name: "FlatList & FlashListに組みこむ場合",
name: "FlatList に組みこむ場合",
description:
"このコンポーネントはお好みのリスト系のコンポーネントへ容易に組み込むことができます。",
},
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/i18n/demo-ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export const demoKo: DemoTranslations = {
nestedChildren2: "또 다른 예제 문장, 중첩이 된 형태입니다.",
},
listIntegration: {
name: "FlatList 및 FlashList 통합",
name: "FlatList 통합",
description: "이 컴포넌트는 선호하는 리스트 인터페이스와 쉽게 통합할 수 있습니다.",
},
styling: {
Expand Down
9 changes: 4 additions & 5 deletions boilerplate/app/screens/DemoPodcastListScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { ComponentType, FC, useCallback, useEffect, useMemo, useState } from "re
import {
AccessibilityProps,
ActivityIndicator,
FlatList,
Image,
ImageSourcePropType,
ImageStyle,
Expand All @@ -11,7 +12,6 @@ import {
View,
ViewStyle,
} from "react-native"
import { type ContentStyle } from "@shopify/flash-list"
import Animated, {
Extrapolation,
interpolate,
Expand All @@ -24,7 +24,6 @@ import { Button, type ButtonAccessoryProps } from "@/components/Button"
import { Card } from "@/components/Card"
import { EmptyState } from "@/components/EmptyState"
import { Icon } from "@/components/Icon"
import { ListView } from "@/components/ListView"
import { Screen } from "@/components/Screen"
import { Text } from "@/components/Text"
import { Switch } from "@/components/Toggle/Switch"
Expand Down Expand Up @@ -81,13 +80,13 @@ export const DemoPodcastListScreen: FC<DemoTabScreenProps<"DemoPodcastList">> =

return (
<Screen preset="fixed" safeAreaEdges={["top"]} contentContainerStyle={$styles.flex1}>
<ListView<EpisodeItem>
<FlatList<EpisodeItem>
contentContainerStyle={themed([$styles.container, $listContentContainer])}
data={episodesForList}
extraData={totalEpisodes + totalFavorites}
refreshing={refreshing}
estimatedItemSize={177}
onRefresh={manualRefresh}
keyExtractor={(item) => item.guid}
ListEmptyComponent={
isLoading ? (
<ActivityIndicator />
Expand Down Expand Up @@ -309,7 +308,7 @@ const EpisodeCard = ({
}

// #region Styles
const $listContentContainer: ThemedStyle<ContentStyle> = ({ spacing }) => ({
const $listContentContainer: ThemedStyle<ViewStyle> = ({ spacing }) => ({
paddingHorizontal: spacing.lg,
paddingTop: spacing.lg + spacing.xl,
paddingBottom: spacing.lg,
Expand Down
20 changes: 13 additions & 7 deletions boilerplate/app/screens/DemoShowroomScreen/DemoShowroomScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import { FC, ReactElement, useCallback, useEffect, useRef, useState } from "react"
import { Image, ImageStyle, Platform, SectionList, TextStyle, View, ViewStyle } from "react-native"
import {
FlatList,
Image,
ImageStyle,
Platform,
SectionList,
TextStyle,
View,
ViewStyle,
} from "react-native"
import { Link, RouteProp, useRoute } from "@react-navigation/native"
import { type ContentStyle } from "@shopify/flash-list"
import { Drawer } from "react-native-drawer-layout"

import { ListItem } from "@/components/ListItem"
import { ListView, type ListViewRef } from "@/components/ListView"
import { Screen } from "@/components/Screen"
import { Text } from "@/components/Text"
import { TxKeyPath, isRTL } from "@/i18n"
Expand Down Expand Up @@ -103,7 +110,7 @@ export const DemoShowroomScreen: FC<DemoTabScreenProps<"DemoShowroom">> =
const [open, setOpen] = useState(false)
const timeout = useRef<ReturnType<typeof setTimeout>>(null)
const listRef = useRef<SectionList>(null)
const menuRef = useRef<ListViewRef<DemoListItem["item"]>>(null)
const menuRef = useRef<FlatList<DemoListItem["item"]>>(null)
const route = useRoute<RouteProp<DemoTabParamList, "DemoShowroom">>()
const params = route.params

Expand Down Expand Up @@ -195,10 +202,9 @@ export const DemoShowroomScreen: FC<DemoTabScreenProps<"DemoShowroom">> =
<View style={themed($logoContainer)}>
<Image source={logo} style={$logoImage} />
</View>
<ListView<DemoListItem["item"]>
<FlatList<DemoListItem["item"]>
ref={menuRef}
contentContainerStyle={themed($listContentContainer)}
estimatedItemSize={250}
data={Object.values(Demos).map((d) => ({
name: d.name,
useCases: d.data({ theme, themed }).map((u) => {
Expand Down Expand Up @@ -268,7 +274,7 @@ const $drawer: ThemedStyle<ViewStyle> = ({ colors }) => ({
flex: 1,
})

const $listContentContainer: ThemedStyle<ContentStyle> = ({ spacing }) => ({
const $listContentContainer: ThemedStyle<ViewStyle> = ({ spacing }) => ({
paddingHorizontal: spacing.lg,
})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable react/jsx-key */
import { TextStyle, View, ViewStyle } from "react-native"
import { FlatList } from "react-native-gesture-handler"

import { Icon } from "@/components/Icon"
import { ListItem } from "@/components/ListItem"
import { ListView } from "@/components/ListView"
import { Text } from "@/components/Text"
import { translate } from "@/i18n/translate"
import type { ThemedStyle } from "@/theme/types"
Expand Down Expand Up @@ -160,9 +160,9 @@ export const DemoListItem: Demo = {
description="demoListItem:useCase.listIntegration.description"
>
<View style={themed($listStyle)}>
<ListView<string>
<FlatList<string>
data={listData}
estimatedItemSize={59}
keyExtractor={(item, index) => `${item}-${index}`}
renderItem={({ item, index }) => (
<ListItem
text={item}
Expand Down
8 changes: 0 additions & 8 deletions boilerplate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"@react-navigation/bottom-tabs": "^7.2.0",
"@react-navigation/native": "^7.0.14",
"@react-navigation/native-stack": "^7.2.0",
"@shopify/flash-list": "1.8.1",
"apisauce": "3.1.1",
"date-fns": "^4.1.0",
"expo": "^53.0.15",
Expand Down Expand Up @@ -90,12 +89,5 @@
},
"engines": {
"node": ">=20.0.0"
},
"expo": {
"install": {
"exclude": [
"@shopify/flash-list"
]
}
}
}
1 change: 0 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ Nothing makes it into Ignite unless it's been proven on projects that Infinite R
| Jest | Test Runner | v29 | Standard test runner for JS apps |
| date-fns | Date library | v4 | Excellent date library |
| react-native-keyboard-controller | Keyboard library | v1 | Great keyboard manager library |
| FlashList | FlatList replacement | v1 | A performant drop-in replacement for FlatList |
| react-native-edge-to-edge | UI library | v1 | Enables edge-to-edge in Android |
| Reactotron RN | Inspector/Debugger | v5 | JS debugging |
| Maestro | Testing Framework | | Automate end-to-end UI testing |
Expand Down
17 changes: 0 additions & 17 deletions docs/boilerplate/app/components/ListView.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/boilerplate/app/components/Screen.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ The `preset` prop is an optional enum that applies to the outer `KeyboardAvoidin
The predefined presets are:

- `scroll` - A preset that applies a scroll behavior to the screen. This is useful for forms or other screens which require a keyboard.
- `fixed` - A preset that applies a fixed behavior to the screen. i.e. The screen will not scroll. This is useful if you have a component such as a `FlashList` that has its own scrolling behavior.
- `fixed` - A preset that applies a fixed behavior to the screen. i.e. The screen will not scroll. This is useful if you have a component such as a `FlatList` that has its own scrolling behavior.
- `auto` - A preset that applies an automatic behavior to the screen. i.e. The screen will scroll if the content is larger than the screen, but not otherwise.

```tsx
Expand Down