Registry / react-native-animatable
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Animatable
✓ import * as Animatable from 'react-native-animatable'
✗ import Animatable from 'react-native-animatable'
The module exports a namespace, not a default export. Using default import will result in undefined.
createAnimatableComponent
✓ import { createAnimatableComponent } from 'react-native-animatable'
✗ import { createAnimatableComponent } from 'react-native-animatable' // correct usage, but often developers mistakenly import from the wrong path
This is a named export from the package, used to wrap custom components.
Animatable.View
✓ import * as Animatable from 'react-native-animatable'; ... <Animatable.View animation='fadeIn' />
✗ import { View } from 'react-native-animatable'; // View is not a named export
Precomposed components are properties of the Animatable namespace, not top-level named exports.
Shows declarative animation and imperative control via ref. Uses TypeScript with ref typing.
import React, { useRef } from 'react';
import { Button, View } from 'react-native';
import * as Animatable from 'react-native-animatable';
const App = () => {
const fadeRef = useRef(null);
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Animatable.Text ref={fadeRef} animation='fadeIn' duration={2000}>
Hello Animatable!
</Animatable.Text>
<Button title='Fade Out' onPress={() => fadeRef.current?.fadeOut?.(800)} />
</View>
);
};
export default App;
Errors
Common errors & fixes
Cannot read property 'default' of undefined (importing Animatable)
Using default import instead of namespace import.
fiximport * as Animatable from 'react-native-animatable'
TypeError: undefined is not an object (evaluating 'this._runAnimation')
Trying to call imperative method on a component that is not an Animatable component.
fixEnsure the ref is attached to an Animatable.View or component wrapped with createAnimatableComponent.
Stylesheet.flatten is not a function
React Native version <0.15 missing StyleSheet.flatten.
fixUpdate React Native to >=0.15 or add a polyfill.
Audit
Dependencies
react-nativerequiredPeer dependency required for animation engine.
prop-typesoptionalUsed for runtime prop type checking (not needed if using TypeScript).