79571403

Date: 2025-04-13 09:59:37
Score: 1.5
Natty:
Report link

When i use JS debugger, i found the grey background color value is contained within the ThemeProvider,so i search this keyword,finally,problem solved by useing following code:

const MyTheme = {
  ...DefaultTheme,
  colors: {
    ...DefaultTheme.colors,
    background: 'transparent',
  },
};

 <NavigationContainer
      style={{ backgroundColor: 'transparent' }}
      theme={MyTheme}
    >
  ...
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Starts with a question (0.5): When i use
  • Low reputation (1):
Posted by: leon.s