react-native-animatable
react-native-animatable copied to clipboard
Animation definitions must have at least two values
I have this issue happening because of the way exports of definitions are managed.
it can be fixed this way :
registry.js
export function initializeRegistryWithDefinitions(definitions) {
Object.keys(definitions).forEach(animationName => {
const animation = typeof definitions[animationName] === 'function'
? definitions[animationName]()
: definitions[animationName];
registerAnimation(
animationName,
createAnimation(definitions[animationName])
);
});
}
@hallya I think there might be a typo.
Also, what I need is a little bit different. I think it's from bringing in redux toolkit but I'm not certain.
node_modules/react-native-animatable/registry.js
export function initializeRegistryWithDefinitions(definitions) {
Object.keys(definitions).forEach(animationName => {
if (animationName !== '__esModule') {
const animationDefinition = typeof definitions[animationName] === 'function'
? definitions[animationName]()
: definitions[animationName];
registerAnimation(
animationName,
createAnimation(animationDefinition)
);
}
});
}