How to do month virtualization like Google calendar in react native?

I am trying to make infinite week / month horizontal slider.

My idea is to have an array of previous month, current month, next month – that order. Each time I “slide” onto next or previous month, the array should be re-adjusted with new previous and next month while correcting the index of current month with animated: false property due to unshift method that I have used so far.

That is the logic I’ve also noticed Google Calendar uses. The one thing that is bothering me the most so far is the deceleration rate of “VirtualizedList”. I’ve put decelerationRate=”fast” but it still seems to be very slow at that very few last moments before list actually stops moving. So far my idea was to call function that will adjust months/weeks on “onMomentumScrollEnd” function but its not smooth/fast at all since that onMomentumScrollEnd event takes at least 1 second to load. Here are some screenshots and videos from Google Calendar and from my app to better present you my problem.

  1. Active month in Google Calendar (it has only month before and month after loaded and based on next photo you will see how I found that out)
    Google Calendar active month

  2. When I scroll to the left (going month backwards) without letting of the scrolling (pinching with both fingers – without letting one of the screen) it is seeable that the list contains 3 elements as I’ve stated before – previous, current and next month.
    Google Calendar previous month

  3. Same principle as on image no.2 – so on the right side there is “end of the list”
    Google Calendar next month

First problem I’ve encountered was when I scrolled “faster” it slide few indexes at the time. Then I’ve found out that there is a prop called “disableIntervalMomentum”. That fixed my problem a little bit but it still passes a lot of time from the moment I start to scroll to the moment it stops scrolling even with “disableIntervalMomentum” and “decelerationRate=”fast””.

Here is a link to my app where I demonstrate that “deceleration” issue I am dealing with – it decelerates good enough until that last 10% of the movement. At the right end it slows down a lot and I don’t want that. I want it to snap really fast as soon as it swipes to the one side it should stop almost instantly.

Behaviour I am looking for is something like this – Google Calendar

It snaps from one index to another really fast – and in case of “fast scroll” it even debounces a little bit from another slide but it still stays at the next wanted index. So for example I am on index 2. I swipe really fast to the right – it goes to index 3 and it even debounces and shows index 4 a little bit but it goes back and stops at index 3. As soon as it “stops” on index 3, it loads new previous and next month – and no matter how fast you scroll it is going to feel very smooth and it gives you impression of “infinite” sliding.

That is my ultimate goal to achieve something similar to that. I am currently using “VirtualizedList” – am I using the wrong component? Is there a component that by default has behaviour like I am describing?

What I am looking for seems like there must be some “built-in” component or prop or something because I’ve seen similar stuff on many other apps but I just can’t replicate it.

Any advice on this topic of “virtualization” of weeks / months is welcome. But at the end of the day I would really like to achieve similar behaviour to what Google Calendar has.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật