satya164 / react-native-tab-view

A cross-platform Tab View component for React Native
MIT License
5.14k stars 1.07k forks source link

feat: split updating state to batches on long lists #1409

Open okwasniewski opened 1 year ago

okwasniewski commented 1 year ago

Motivation

As reported here: #1405, when using really long lists header wouldn't get all tab widths and therefore would stop rendering. If we have more than 10 routes we split rendering into multiple batches using onViewableItemsChanged.

Recording

https://user-images.githubusercontent.com/52801365/202131182-cae0c891-f502-4f34-b790-461cb7faad2a.mp4

Test plan

Launch Scrollable tab bar example and scroll.

Code formatting

Look around. Match the style of the rest of the codebase. Run yarn lint --fix before committing.

github-actions[bot] commented 1 year ago

The Expo app for the example from this branch is ready!

expo.io/@satya164/react-native-tab-view-demos?release-channel=pr-1409