On android useAnimatedStyle fails when Animated.FlatList has the onRefresh property. #4730
Open
Description
Description
const opacityStyle = useAnimatedStyle(() => {
console.warn('inited', inited.value);
return {
opacity: inited.value ? 1 : 0,
};
});
<Animated.FlatList
onRefresh={props.onRefresh}
refreshing={props.refreshing}
data={props.data}
renderItem={props.renderItem}
style={[{flex: 1}, opacityStyle]}
/>
the opacityStyle not working but if i remove onRefresh it works again. it only happens on android.
Steps to reproduce
- set onRefresh and animated style for a Animated.FlatList
- animated style not working
- remove onRefresh
- animated style works
Snack or a link to a repository
https://gitlab.com/dogofe/enhance-tab-view.git
Reanimated version
2.17.0
React Native version
0.71.2
Platforms
Android
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
None
Device
Android emulator
Device model
No response
Acknowledgements
Yes