How to add FlashList in React Native

It’s a known fact that the performance of FlatList slows down when you have a huge chunk of data. Shopify introduced an alternative to FlatList named FlashList which fixes the shortcomings of FlatList. FlashList is fast and performant when compared to FlatList. It increases the performance in both Android and iOS platforms. After all, FlashList…

How to Generate Random Colors in React Native

Sometimes, you may want to generate random colors in your react native project. This short tutorial helps you to generate random colors and set them as background colors in react native. You can generate a random color using the following function in JavaScript. In the following react native example, there’s a FlatList with items that…

How to Fix Failed child context type: Invalid child context Warning in React Native

When you use components such as FlatList, you may get few warnings in react native. Even though these warnings may not appear as crucial it’s always better to fix those warnings. One such warning you may come across is given below. Warning: Failed child context type: Invalid child context virtualizedCell.cellKey of type number supplied to…

How to Add Scroll to Bottom Functionality to FlatList in React Native

Everyone knows the importance of the FlatList component in react native apps. FlatList helps us to huge amounts of data in the most user-friendly way. In this blog post, let’s check how to add a scroll to bottom functionality to FlatList. If you are looking for how to add the scroll to top option in…

How to Disable Scrolling on Flatlist in React Native

By default, the behavior of the FlatList component of react native is to scroll. But, in some unusual situations, you may want to disable scrolling in react native FlatList. This blog post goes through how to disable scrolling in FlatList. As you know, FlatList inherits the props of the ScrollView component. Hence you can use…