![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
react-native-animated-loader
Advanced tools
Useful to show lottie animation spinners in react-native mobile apps
Read more on blog
A React Native Loader Component which uses Airbnb's Lottie for beautiful loader animations.
This library uses lottie-react-native to render loader animations. Therefore this library need to be installed and linked to your project before installing this package.
Follow the official instruction and linking guide here.
No need to anything but to install the package itself. Expo already has Lottie library API available.
yarn add react-native-animated-loader
or
npm install react-native-animated-loader --save
import React from 'react';
import { StyleSheet } from 'react-native';
import AnimatedLoader from "react-native-animated-loader";
export default class Loader extends React.Component {
constructor(props) {
super(props);
this.state = { visible: false };
}
componentDidMount() {
setInterval(() => {
this.setState({
visible: !this.state.visible
});
}, 30000);
}
render() {
const { visible } = this.state;
return (
<AnimatedLoader
visible={visible}
overlayColor="rgba(255,255,255,0.75)"
source={require("./loader.json")}
animationStyle={styles.lottie}
speed={1}
/>
);
}
}
const styles = StyleSheet.create({
lottie: {
width: 100,
height: 100
}
});
Prop | Description | Default |
---|---|---|
source | The source of animation. Can be referenced as a local asset by a string, or remotely with an object with a uri property, or it can be an actual JS object of an animation, obtained (for example) with something like require('../path/to/animation.json') . | Lottie Object |
visible | Controls the visibility of the loader. | false |
overlayColor | Changes the color of the overlay. | rgba(255,255,255,0.75) |
animationStyle | The style to be applied to the Lottie. | - |
animationType | Changes animation on show and hide loader's view. | none |
speed | The speed the animation will progress. | 1 |
loop | A boolean flag indicating whether or not the animation should loop. | true |
Licensed under the MIT.
If this project helped you reduce time to develop, please consider buying me a cup of coffee :)
FAQs
Useful to show lottie animation spinners in react-native mobile apps
The npm package react-native-animated-loader receives a total of 0 weekly downloads. As such, react-native-animated-loader popularity was classified as not popular.
We found that react-native-animated-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.