
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-animated-manager
Advanced tools
Simple class wrapping native Animated Value that helps to perform various operations on them
Simple class wrapping native Animated Value that helps to perform various operations on them
yarn add react-native-animated-mananger
import { AnimatedManager } from 'react-native-animated-mananger';
new AnimatedManager(0);
new AnimatedManager(true); // will convert true > 1, false > 0
new AnimatedManager(new Animated.Value(1));
const value = new AnimatedManager(0);
const rawAnimatedValue = value.getValue();
const valueA = new AnimatedManager(1);
const valueB = new AnimatedManager(2);
const valueC = new AnimatedManager(4);
const valueD = valueA
.add(valueB, valueC)
.multiply(2)
.divide(valueB);
<SomeAnimatedView style={{ height: valueD.getValue() }} />;
const value = new AnimatedManager(1);
async function increase() {
await value.spring({ toValue: 2 }); // no need to call .start()
console.log('animation finished');
}
// allowed input for AnimatedManager class and methods
type AnimatedValueInput = number | boolean | Animated.Value | AnimatedManager;
// return raw react natvie Animated.Value
value.getValue(): RawAnimatedValue;
// inverts value that is in 0-1 range.
// example: const animatedOpacity = isHidden.invert()
// it's shortcut of .interpolate({ inputRange: [0, 1], outputRange: [1, 0})
value.invert(): AnimatedManager;
// basic mathematical operators - under the hood it just use raw Animated.add etc but in chainable way
// also every valid AnimatedManager input can be used eg. someValue.add(new Animated.Value(2), 50, true)
value.multiply(...inputs: AnimatedValueInput[]): AnimatedManager;
value.subtract(...inputs: AnimatedValueInput[]): AnimatedManager;
value.add(...inputs: AnimatedValueInput[]): AnimatedManager;
value.divide(...inputs: AnimatedValueInput[]): AnimatedManager;
// Works the same as raw Animated.spring etc, but doesnt need .start() to be called and returns promise that is resolved when animation is finished
value.spring(config: RawAnimated.SpringAnimationConfig): Promise<this>;
value.timing(config: RawAnimated.TimingAnimationConfig): Promise<this>;
// works exactly as native interpolation function
value.interpolate(interpolation: RawAnimated.InterpolationConfigType): AnimatedManager;
Always remember to call .getValue() before passing it to animated view. Animated view will only accept raw Animated.Value instance that is returned by .getValue()
Connecting it to events. Pass .getValue() result to Animated.Event
Also there is helper method for scroll based events:
<ScrollView onScroll={animatedManagerInstance.getScrollListener('y')} />
FAQs
Simple class wrapping native Animated Value that helps to perform various operations on them
We found that react-native-animated-manager 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.