Skip to content

VirtualizedLists should never be nested inside plain ScrollViews with the same orientation because it can break windowing and other functionality (not warning) #33024

Description

@dhairyasenjaliya

Description

Copy this code to the new react-native project which has a version of 0.64 it will fail right away

After Updating from react native 0.61 to 0.64 VirtualizedLists should never be nested inside plain ScrollViews (Error not warning) start falling as I can't just change to each and every page I need one general solution as I don't have any large flatlist inside scroll view but I can't modify each and every pages individual I just need the same working as previous react version as performance is not concerned dut to a small list

tried methods so far

1.FlatList add props = nestedScrollEnabled

2.ListHeaderComponent & ListFooterComponent (can't change due to number of pages are hight)

3.LogBox / Yellobox to hide error LogBox.ignoreLogs(['VirtualizedLists should never be nested']);

Dont want to add a Map loop into the render UI

Version

0.66.4

Output of npx react-native info

System:
OS: macOS 11.6.2
CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Memory: 41.50 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 15.3.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.9 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK: Not Found
IDEs:
Android Studio: 4.0 AI-193.6911.18.40.6514223
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: 14.0.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.66.4 => 0.66.4
react-native-macos: Not Found

Steps to reproduce

Just initiate new react native project copy and paste below code in render method

Snack, code example, screenshot, or link to a repository

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions