Grokking React Native
Vote

0% completed

​

How Styling Works in React Native

Every part of a React Native screen gets its appearance from one prop named style. The value of that prop is a plain JavaScript object, and there is no CSS file behind it. This chapter builds a small profile card for a person named Ana Silva, starting with her name.

import { Text, View } from 'react-native'; const App = () => { return ( <View style={{ padding: 40 }}> <Text style={{ color: 'blue', fontSize: 24 }}>Ana Silva</Text> </View> ); }; export default App;

The double braces are not special syntax

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content