Describe the bug
The new version of React Native renders a black background when using the withAuthenticator
HOC.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
White background & normal UI shows up
Screenshots
Desktop (please complete the following information):
{
"name": "randomrn",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"aws-amplify": "^1.1.19",
"aws-amplify-react-native": "^2.1.7",
"react": "16.6.3",
"react-native": "0.58.2"
},
"devDependencies": {
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "24.0.0",
"jest": "24.0.0",
"metro-react-native-babel-preset": "0.51.1",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
}
}
Smartphone (please complete the following information):
Additional context
I tested this with older versions of React Native, as late as 0.57.8, & it worked fine.
You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = 'DEBUG'; in your app.
If anyone wants a workaround for now, you can initialize a pre 0.58.0 version of React Native until this gets resolved:
react-native init --version 0.57.8 MyProject
A workaround for react-native >= 58
const theme = StyleSheet.create({
...AmplifyTheme,
container: {
...AmplifyTheme.container,
backgroundColor: '#FFFFFF'
}
});
export default withAuthenticator(App, false, [], null, theme);
This was great thanks @manueliglesias ! Does anyone have any recommendations on fixing the busted styling on iPhone X simulator?
Furthermore, after authenticating successfully the next screen I see has a complete black background too.
Am seeing this in the latest version of react native vs the amplify react native library i installed today. Was any one able to get this fixed? also am noticing that the AmplifyTheme.js is not present inside node_modules/aws-amplify-react-native/src , its empty
Same issue here, not found a good fix yet
Most helpful comment
A workaround for react-native >= 58