0.1.13 • Published 4 years ago

rn-loader-container v0.1.13

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

RN Loader Container

Useful container to show animated views while you get and load the data to display.

Commands

Install the dependency

npm i rn-loader-container

Usage example

import React from 'react';
import LoaderContainer from 'rn-loader-container';
import MockupItem from './components/MockupItem';
import {View} from 'react-native';

// MockupItem is the view to display with the effect inside the container.
const MyListScreen = () => {
  return (
    <View>
      <LoaderContainer total={2}>{MockupItem}</LoaderContainer>
    </View>
  );
}

export default MyListScreen;

Properties

PropDescriptionDefault
totalNumber of items. If the value is greater than 1, the content will be multiplied by that number.1
opacityThe opacity to apply with the animation.0.5
durationAnimation duration in milliseconds.700