
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@rootstrap/react-native-use-animate
Advanced tools
React Native animations made simple.
Whether you are looking to get started with animations in React Native or you need to add a simple animation to your app and are looking for a simple and light weight option, this is the library for you.
This library contains some simple animation hooks that will cover simple use cases and some complex ones as well.
To test it out yourself you can clone this repo and go into the demo
folder, then run expo start
and open the app on a simulator or device.
Since the demo is an expo project, we also have the app published on Expo. All you have to do is download the expo client app and scan the following QR code:
This is only available for Android since Apple has restrictions on how apps can be published.
yarn add @rootstrap/react-native-use-animate
npm install @rootstrap/react-native-use-animate --save
And that's it! No linking needed no matter which version of react-native you are running.
import React from 'react';
import { Animated, StyleSheet } from 'react-native';
import { useAnimate } from '@rootstrap/react-native-use-animate';
const styles = StyleSheet.create({
box: {
width: 100,
height: 100,
backgroundColor: 'red',
},
});
const AnimatedBox = () => {
const animatedX = useAnimate({
fromValue: 0,
toValue: 100,
duration: 1000,
iterations: -1,
bounce: true,
});
return (
<Animated.View style={[styles.box, { left: animatedX.animatedValue }]} />
);
};
import React from 'react';
import { Animated, StyleSheet } from 'react-native';
import {
useAnimate,
useAnimateParallel,
} from '@rootstrap/react-native-use-animate';
const styles = StyleSheet.create({
box: {
width: 100,
height: 100,
backgroundColor: 'red',
},
});
const AnimatedBox = () => {
const animatedOpacity = useAnimate({
animate: false,
bounce: true,
});
const animatedRotation = useAnimate({
bounce: true,
animate: false,
});
useAnimateParallel({
animations: [animatedOpacity, animatedRotation],
iterations: -1,
duration: 1000,
});
return (
<Animated.View
style={[
styles.box,
{
opacity: animatedOpacity.animatedValue,
transform: [
{
rotate: animatedRotation.interpolate({
outputRange: ['0deg', '360deg'],
}),
},
],
},
]}
/>
);
};
import React from 'react';
import { Animated, StyleSheet } from 'react-native';
import {
useAnimate,
useAnimateSequence,
} from '@rootstrap/react-native-use-animate';
const styles = StyleSheet.create({
box: {
width: 100,
height: 100,
backgroundColor: 'red',
},
});
const AnimatedBox = () => {
const animatedX = useAnimate({
fromValue: 0,
toValue: 200,
animate: false,
});
const animatedY = useAnimate({
fromValue: 0,
toValue: 200,
bounce: true,
animate: false,
});
useAnimateSequence({
animations: [animatedX, animatedY],
iterations: -1,
duration: 1000,
});
return (
<Animated.View
style={[
styles.box,
{
left: animatedX.animatedValue,
top: animatedY.animatedValue,
},
]}
/>
);
};
If you have an idea that could make this library better we would love to hear it. Please take a look at our Contributing Guidelines to get to know the rules and how to get started with your contribution.
@rootstrap/react-native-use-animate is available under the MIT license. See the LICENSE file for more info.
@rootstrap/react-native-use-animate is maintained by Rootstrap with the help of our contributors.
FAQs
React Native animations made simple
We found that @rootstrap/react-native-use-animate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.