Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header Style Shadows warnings can't be disabled #7845

Open
1 task done
LouisCapelle opened this issue Feb 12, 2024 · 0 comments
Open
1 task done

Header Style Shadows warnings can't be disabled #7845

LouisCapelle opened this issue Feb 12, 2024 · 0 comments

Comments

@LouisCapelle
Copy link

LouisCapelle commented Feb 12, 2024

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?

  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant