Create Loader in React Native – Code Example

In this article we will provide you code to create loader in your react native mobile app. Loaders are created using <ActivityIndicator> component. You can customize its size, color, animation etc.

Code Example –

import React from "react";
import { ActivityIndicator, View } from "react-native";

const App = () => (
  <View>
    <ActivityIndicator />
    <ActivityIndicator size="large" />
    <ActivityIndicator size="small" color="#0000ff" />
    <ActivityIndicator size="large" color="#00ff00" />
  </View>
);

export default App;

Source: ReactNative Docs