Want to do Inline Styling with React Native? Use the below example to add Inline Styling with React Native application:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import * as React from 'react'; import { Text, View, StyleSheet } from 'react-native'; export default function App() { return ( <View style={styles.container}> <View style={{ backgroundColor: 'yellow' }}> <Text style={{ color: 'red' }}> {' '} Hello I love Programming and building android apps{' '} </Text> </View> </View> ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', }, }); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.