PedroBern / react-native-collapsible-tab-view

A cross-platform Collapsible Tab View component for React Native
MIT License
829 stars 160 forks source link

FPS Drop when Swiping #270

Open captainAldi opened 2 years ago

captainAldi commented 2 years ago

Issue:

Existing Workaround:

Question:

Thanks

andreialecu commented 2 years ago

Try logging your renders by adding something like console.log("rendering") and seeing if you're not re-rendering excessively while swiping tabs. You can fix it afterward by memoizing things as much as possible, either with React.memo or useMemo

captainAldi commented 2 years ago

Yes, its re-render when i swipe.. and i tried to wrap content in each tab with React Memo.. still get fps drop

then, i just run quick start in example also get drop fps..

or could you provide example on readme ? that will probably help others too

the interisting one is, i just try to use it with https://github.com/oblador/react-native-collapsible on renderHeader component it's also laggy..