I'm using react-native-tab-view and decided to install react-native-reanimated@alpha, however, when I tried to use them together, the error "TypeError: cannot read property 'viewTag' of undefined" occurs whenever the component tries be rendered.
I started looking for solutions and ended up arriving at the following code at ./reanimated2/createAnimatedComponent.js
const processedStyle = styles.map(style => {
if (style.viewTag) {
// this is how we recognize styles returned by useAnimatedStyle
return style.initial;
} else {
return style;
}
});
I noticed that this style is null or undefined at some point, to correct, I checked, before the viewTag property, the 'style' and the problem was solved.
const processedStyle = styles.map(style => {
if (style && style.viewTag) {
// this is how we recognize styles returned by useAnimatedStyle
return style.initial;
} else {
return style;
}
});
Description
I'm using react-native-tab-view and decided to install react-native-reanimated@alpha, however, when I tried to use them together, the error "TypeError: cannot read property 'viewTag' of undefined" occurs whenever the component tries be rendered.
I started looking for solutions and ended up arriving at the following code at ./reanimated2/createAnimatedComponent.js
I noticed that this
style
is null or undefined at some point, to correct, I checked, before theviewTag
property, the 'style' and the problem was solved.Package versions