FPS Drop when Swiping
Issue:
- When i swipe / change tab, the FPS dropped to 39-40fps ~
- But when i change renderTab to null, its stablize in 59 fps
Existing Workaround:
- Trying to create custom MaterialTabBar
- using callback on it
- but still get FPS Drop
Question:
- Is that normal ?
- What can i do with it to show tabbar with no FPS drop ?
Thanks
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
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..