I am trying to achieve something like this:
The data is something like: Root Category -> Sub Category -> Products. We have something like 3000+ products. Showing all products slows down the device (if there is something I can do to render faster, please let me know), so I've cut them down to sub-categories instead, where there are about 5-12 sub-categories within each category, and about 200 products within each sub-category.
The Code
List Component: https://gist.github.com/Fl4zher/5e6f90d3d10e494d0f19395231f25946
TabBar: https://gist.github.com/Fl4zher/f42afbbc6a57602d0ed4c682d5ac0a20
What I've experienced
- The list will be a bit laggy even with 200 products.
- When I press on sub-category at tab menu, it takes a bit while to take action (about 1-2 sec).
- When I scroll, the tab menu doesn't follow up quite well.
- After using the tab menu few times, it goes slower than before.
What I want
When I press on a category from tab menu, I want it to scroll to the chosen sub-category list.
When I scroll, I want the tab menu to follow along with the current shown sub-category list.