I am following a tutorial online to learn how to use React.
The instructor made me create a project called albums
and modify the content of index.
You need to define a background color for you application. You should also import View
from react-native
import { AppRegistry, Text, View } from "react-native";
const App = () => {
return (
<View style={{backgroundColor: 'white', flex:1}}>
<Text>Some Text</Text>
</View>
);
};
The reason that it is black is because the in the AppDelegate.m
the rootView backgroundColor has been changed in version 0.58.0
In prior versions it was
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
It is now the following in 0.58.+
rootView.backgroundColor = [UIColor blackColor];