-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
Wrapping RefreshControl and passing it as JSX does not work on Android #49878
Comments
@coolsoftwaretyler thanks for opening the issue! We will look into it. Given you tested on 0.78, I assume this is what you observe in the New Architecture, am I right? Have you perhaps checked also the old architecture to see how it behaved? |
Yes, so far I've only checked on new arch. I ran into this originally on an Expo SDK 52 app, so it seems to also happen back to v0.76 (also on new arch). For the reproducer I wanted to see if it was an issue on latest. I'll check the old arch and report back. |
Looks to be an issue on the old architecture on React Native |
Both ways works but when you pass as JSX you need to put the children prop because the @cipolleschi what do you think about improve the docs with this example? |
Yeah that fixed it for me! I never knew that, haha. Thank you very much @luancurti |
Description
Hey folks, when using the
refreshControl
as a prop toScrollView
, I'm seeing a slight difference between Android and iOS.Steps to reproduce
RefreshControl
component from React Native as JSX, it works on Android and iOSRefreshControl
in a custom component and pass it as JSX, it works on iOS, but Android crashesAt first I thought maybe
RefreshControl
was special and didn't want to be wrapped. Or that therefreshControl
prop onScrollView
always wanted to call a function. But the difference cross-platform makes me think that it's a bug somewhere.Very minor pain point, but I thought I'd capture it in case that's helpful, or perhaps I've misunderstood how it ought to work.
React Native Version
0.78.0
Affected Platforms
Runtime - Android
Output of
npx @react-native-community/cli info
Stacktrace or Logs
Reproducer
https://github.com/coolsoftwaretyler/RefreshControlReproducer
Screenshots and Videos
Video was too big for GH upload, here's a Dropbox: https://www.dropbox.com/scl/fi/a8106gdwf4st88lsemsuq/2025-03-06-refresher-bug.mov?rlkey=e61k2c5kh3l1ffh8h4k9wes51&st=hdw29mc4&dl=0
The text was updated successfully, but these errors were encountered: