![]() ![]() Feel free to have a look at its source code here. I've also created a Open source Book Searching React Native app in which I used these placeholder components as loaders. You can customize these placeholder components according to your need or app theme.įind the source code in the Github repo here. This is just a simple implementation of placeholders screens as loaders. We have successfully created a React Native app that uses rn-placeholder to show placeholder as loaders during data fetching just like facebook, Netflix and other popular apps. So during the data fetching BookCardPlaceholder will be rendered and when the data is fetched successfully BookCardComponent will be rendered by the FlatList. This is what the users will see during the data fetching. In renderPlaceholders() we'll render BookCardPlaceholder using the map function. In renderX() we'll return a FlatList which will render the list of Books using renderBookComponent. Let's set up a new Expo project using expo-cli.Įxport default function App () Make sure to update expo-cli if you haven't updated in a while since expo releases are quickly out of date.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |