Grokking React Native
Vote

0% completed

​

Styling Buttons and Touchable Elements

A press is not one event but a short sequence: the finger touches the screen, the finger lifts, and the app responds. A good button shows a visible change during that sequence, so that the user knows the touch was received. The Follow button on Ana's profile card starts with the simplest option and then moves to one that you can style freely.

The Built-in Button

The Button component needs only a title and an onPress function.

import { Alert, Button, StyleSheet, View } from 'react-native'; const App = () => { return ( <View style={styles.screen}>

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content