In my react-native application, I want to render a spinning logo as the right header for a screen.
<Stack.Screen
name="About"
component={About}
options={{headerRight: () => <SpinnerIcon />}}
/>
And the spinner component returns an Animated.Image
<Animated.Image
source={require('../img/reactLogoTwo.png')}
style={[{width: 50, height: 50}, {transform: [{rotate}]}]}
/>
The image I have saved in img
folder has a transparent background (downloaded from here) but the animated image rendered with a white background.
Notes: adding backgroundColor: 'transparent'
does not work.