Reputation: 371
My app View
style
is not working. I`m using react 0.44.0 with 2 emulators, however none of them is working properly. Can someone help me?
Here is my code:
import React, { Component } from 'react';
import {
AppRegistry,
View,
ReactNative,
Text
} from 'react-native';
const Estilos = {
estiloTexto: {
fontSize: 40,
backgroundColor: '#08509B'
},
estiloView: {
backgroundColor: 'skyblue',
height: 300
}
};
//Criar o componente
const App = () => {
const { estiloTexto, estiloView } = Estilos;
return (
<View sytle={{ backgroundColor: 'skyblue', height: 300 }}>
<Text style={estiloTexto}>Frases do Dia</Text>
</View>
);
};
//Renderizar para o dispositivo
AppRegistry.registerComponent('app2', () => App);
The following should be appearing:IOS emulator But instead I get this: Android
Upvotes: 2
Views: 455
Reputation: 22209
You have a typo in your code
<View sytle={{ backgroundColor: 'skyblue', height: 300 }}>
Change sytle
to style
Upvotes: 1