Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
react-native-animatable unmount animation with hooks
const MyComponent = (props) => {
const ref = React.useRef();
React.useEffect(() => {
return () => ref?.current?.fadeOut(); // as you know, this is the same as unmount ;)
}, []); // track some prop that changes
return (
<Animatable.View ref={ref}>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment