Types: FlashListProps imports ViewabilityConfig from react-native, removed in RN 0.87+
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- react-native, typescript
- Domain
- mobile-dev
Research direction
Start with src/FlashListProps.ts and inspect how ViewabilityConfig is used in the FlashListProps type. Replace the unavailable React Native type import with an appropriate local definition, then investigate why horizontal must be included in the omitted ScrollViewProps keys. Run the minimal strict TypeScript reproduction and the project type-check to confirm compatibility with React Native 0.87 and 0.88.
Written by the indexing model from the issue text.
Description
Description
src/FlashListProps.ts imports ViewabilityConfig from react-native. React Native 0.87 and 0.88 no longer export that type, so type-checking code that uses FlashList fails with TS2305 on that import.
We also needed "horizontal" in the Omit<ScrollViewProps, ...> of FlashListProps to get the props to type-check. We have not isolated why, so please treat that part as a question.
Current behavior
With react-native 0.88.0, tsc --strict reports error TS2305: Module '"react-native"' has no exported member 'ViewabilityConfig'. on the import in FlashListProps.ts.
Expected behavior
The package type-checks against react-native 0.87 and 0.88 without errors.
Reproduction
Minimal steps (no app needed):
- Create a file with:
import type { ViewabilityConfig } from "react-native";
export const v: ViewabilityConfig | undefined = undefined;
- Run
npx tsc --noEmit --strictin a project with react-native 0.88.0.
Environment: @shopify/flash-list 2.3.3 (latest on npm), react-native 0.88.0, Expo SDK 58.
Expo Snack or minimal reproduction link:
Not yet. The minimal snippet above is the repro. A Snack link can follow if the maintainers need one.
Suggested fix
Define the viewability config shape in FlashListProps.ts instead of importing it from react-native.
- Dominant language
- TypeScript
- Stars
- 7.2k
- Forks
- 401
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Shopify/flash-list
-
StickyHeaders.compute() throws "index out of bounds, not enough layouts" — its guard checks getDataLength() but the binary search indexes the layout arrayPossibly taken @YuEfSaEDU claimed this 32 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Shopify/flash-list#2509 · 1 comment ·
-
v2: Android view flattening removes ViewHolderCollection's container, breaking row positions (missing contentContainerStyle padding + ListHeaderComponent offset)Possibly taken @wanxiankai claimed this 87 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Shopify/flash-list#2399 · 1 comment ·
-
v2 `inverted` on react-native-web freezes virtualization (permanent blank list, onEndReached never fires): firstItemOffset measurement ignores the scaleY(-1) transformPossibly taken @HuuNguyen312 claimed this 125 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Shopify/flash-list#2380 · 1 comment ·
-
Stale ViewHolder onLayout can throw when its layout index no longer existsPossibly taken @narumichi0710 claimed this 149 days ago. Openagent-triage P1
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Shopify/flash-list#2291 ·
-
Sticky header container blocks touch events on content beneath itPossibly taken @Shevilll claimed this 122 days ago. Openagent-triage bug P1
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Shopify/flash-list#2249 ·
All issues in Shopify/flash-list
Similar issues
-
Sequências em espanhol: «Atualizado em», a aba «Fila» e o valor 'pause' ainda saem em portuguêsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
melgarafael/DeskcommCRM#3104 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug service: webapp
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Ocelot-Social-Community/Ocelot-Social#10684 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nicobailon/pi-subagents#2978 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
getsentry/sentry-conventions#732 · 1 comment ·
Maintainers usually reply within 1 day