Default text and background are the same color on react native 0.58
See original GitHub issueDescribe the bug In react native 58+, the default background color is black instead of white, and so the default UI theming that comes out of the box with storybook UI is invisible
To Reproduce
Steps to reproduce the behavior:
Follow the instructions to install storybook on a newly created react native project
react-native init newProject
cd newProject
npx -p @storybook/cli sb init
Expected behavior Expected the default text color to not be the same as the background
Screenshots
Code snippets adding this to the style file for the preview list component shows the ui
flex: {
backgroundColor: 'white',
flex: 1
},

System:
- MacOS
- Device: Macbook pro 2015
- Framework: react native
- Version: 4.1.11
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:6 (1 by maintainers)
Top Results From Across the Web
react-native style opacity for parent and child - Stack Overflow
Try changing the opacity using alpha-value of the background color instead. Then it should be possible applying different opacities for ...
Read more >Customize React Native text color and other theme elements
Starting simply with a black-and-white layout · Adding one more color to your theme · Applying a triadic color scheme to our React...
Read more >Color Reference - React Native
Components in React Native are styled using JavaScript. Color properties usually match how CSS works on the web. General guides on the color...
Read more >react native webview background color - You.com | The AI ...
Yes. You can. You can actually change the background color of the webview by doing this. Add a style prop in the WebView...
Read more >CSS font-size-adjust property - W3Schools
By specifying the font-size-adjust property, the browser will adjust the font ... same regardless of the font family ("verdana" has the aspect value...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For me I realized it’s caused by this line in
AppDelegate.m
for 0.58.x It becomesrootView.backgroundColor = [UIColor blackColor];
whereas previously it’srootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
Now I changed it to
rootView.backgroundColor = [UIColor whiteColor];
and it defaults to white againNon-intrusive workaround is to wrap the
StorybookUIRoot
component inside aView
with its background color set to white: