react-native Styling Styling using inline styles


Each React Native component can take a style prop. You can pass it a JavaScript object with CSS-style style properties:

<Text style={{color:'red'}}>Red text</Text>

This can be inefficient as it has to recreate the object each time the component is rendered. Using a stylesheet is preferred.