react-native-navigation
react-native-navigation copied to clipboard
Header Style Shadows warnings can't be disabled
What happened?
Setting header options with shadows, we get this error : (ADVICE) View #623 of type RCTView has a shadow set but cannot calculate shadow efficiently. Consider setting a background color to fix this, or apply the shadow to a more specific component.
What was the expected behaviour?
This warnings can't be disbaled
Was it tested on latest react-native-navigation?
- [X] I have tested this issue on the latest react-native-navigation release and it still reproduces.
Help us reproduce this issue!
<Stack.Screen
component={Help}
name="Help"
options={{
headerShown: true,
headerTitle: renderHeaderTitle,
headerTitleAlign: 'center',
headerShadowVisible: true,
headerStyle: defaultHeaderStyle,
headerBackTitleVisible: false,
headerLeft: (props) => renderHeaderBackImage(props.onPress),
}}
/>
const defaultHeaderStyle = {
height: 70 + insets.top,
shadowColor: colors.shadowBlack,
elevation: 5,
shadowOffset: {
width: 0,
height: 2,
},
shadowOpacity: 0.17,
shadowRadius: 2,
backgroundColor: backgroundColor,
}
In what environment did this happen?
React Native Navigation version: ^6.1.9 React Native version: 0.71.14 Has Fabric (React Native's new rendering system) enabled: (yes/no) : no Node version: 18.19.0