rn-loader-container
v0.1.13
Published
Adds animated effect to the content, so the app can load whatever is needed.
Downloads
10
Maintainers
Readme
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
| Prop | Description | Default | |----------|-------------|:-------------:| | total | Number of items. If the value is greater than 1, the content will be multiplied by that number. | 1 | opacity | The opacity to apply with the animation. | 0.5 | duration | Animation duration in milliseconds. | 700