Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MasonryFlashList: Invalid prop externalScrollView #616

Closed
1 of 2 tasks
elliotsayes opened this issue Sep 26, 2022 · 3 comments
Closed
1 of 2 tasks

MasonryFlashList: Invalid prop externalScrollView #616

elliotsayes opened this issue Sep 26, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@elliotsayes
Copy link

Current behavior

import { FlashList, MasonryFlashList } from "@shopify/flash-list"
import { Text } from "react-native"

const DATA = [
  {
    title: "First Item",
  },
  {
    title: "Second Item",
  },
];

const NoteListScreen = () => {
  return (
    <MasonryFlashList
      data={DATA}
      numColumns={2}
      renderItem={({ item }) => <Text>{item.title}</Text>}
      estimatedItemSize={200}
    />
  )
}

Results in:

 ERROR  Warning: Failed prop type: Invalid prop `externalScrollView` of type `object` supplied to `ProgressiveListView`, expected `function`.
    at ProgressiveListView (http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.Notes2:119804:50)
    in FlashList (created by PureComponentWrapper)
    in RCTView (created by View)
    in View (created by PureComponentWrapper)
    in PureComponentWrapper (created by ViewRenderer)
    in CellContainer (created by ViewRenderer)
    in ViewRenderer (created by ProgressiveListView)
    in AutoLayoutView (created by AutoLayoutView)
    in AutoLayoutView (created by ScrollComponent)
    in RCTView (created by View)
    in View (created by ScrollComponent)
    in RCTScrollContentView (created by ScrollView)
    in RCTScrollView (created by ScrollView)
    in ScrollView (created by ScrollView)
    in ScrollView (created by ScrollComponent)
    in ScrollComponent (created by ProgressiveListView)
    in ProgressiveListView (created by StickyContainer)
    in RCTView (created by View)
    in View (created by StickyContainer)
    in StickyContainer (created by FlashList)
    in FlashList (created by MasonryFlashList)
    in MasonryFlashList (created by NoteListScreen)
    in NoteListScreen (created by DevelopmentApp)
    in DevelopmentApp
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in Notes2(RootComponent)

This only happens for MasonryFlashList, not FlashList

Expected behavior

No warning.

To Reproduce

React native typescript template + https://github.com/elliotsayes/MasonryFlashListRepro/commits/main

Platform:

  • iOS
  • Android

Environment

1.3.0

@elliotsayes elliotsayes added the bug Something isn't working label Sep 26, 2022
@naqvitalha
Copy link
Collaborator

We mentioned this in our release notes already. We will fix this soon but this warning isn't something to be worried about. It's just that one of the prop types in recyclerlistview is incorrect.

@madmeatballs
Copy link

any updates on this? Is this fixed already?

Encountered it with "@shopify/flash-list": "^1.3.0"

@naqvitalha
Copy link
Collaborator

Fixed in v1.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants