Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@skyscanner/react-native-transitiongroup
Advanced tools
light port of `ReactTransitionGroup` to work in react-native
Works similar to ReactTransitionGroup found in react
, but reimplemented in seperate library to work better with react-native
https://github.com/reactjs/react-transition-group/issues/6
important to always give your Transition
components a unique key
.
import TransitionGroup, { FadeInOutTransition } from 'react-native-transitiongroup';
<TransitionGroup>
<FadeInOutTransition key="loader">
{this.state.isLoading ? <Loader /> : null}
</FadeInOutTransition>
</TransitionGroup>
You can easily create your own transitions, by creating your own Transition component.
TransitionGroup
will look for the following methods to be called on its child components to animate enter
and leave
componentWillEnter(callback)
componentWillLeave(callback)
class ScaleInOutTransition extends Component {
constructor() {
super();
this.state = {
progress: new Animated.Value(0),
};
}
componentWillEnter(callback) {
Animated.timing(this.state.progress, {
toValue: 1,
delay: this.props.inDelay,
easing: this.props.easing,
duration: this.props.inDuration,
}).start(callback);
}
componentWillLeave(callback) {
Animated.timing(this.state.progress, {
toValue: 0,
delay: this.props.outDelay,
easing: this.props.easing,
duration: this.props.outDuration,
}).start(callback);
}
render() {
const animation = {
transform: [
{ scale: this.state.progress },
]
};
return (
<Animated.View
style={[this.props.style, animation]}>
{this.props.children}
</Animated.View>
);
}
}
FAQs
light port of `ReactTransitionGroup` to work in react-native
The npm package @skyscanner/react-native-transitiongroup receives a total of 12 weekly downloads. As such, @skyscanner/react-native-transitiongroup popularity was classified as not popular.
We found that @skyscanner/react-native-transitiongroup demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.