Button

Learn how to add interactivity to applications using the Button component.

In mobile applications, buttons are used to add interactivity to the applications. For example, they can be used to perform actions such as logging in or out of an application or to submit form data. We can also display visuals such as text and icons inside buttons.

Usage

To implement and use the Button component, we first have to import it from the react-native library.

Press + to interact
import { Button } from 'react-native';

Once the Button component has been imported, we can use it inside our application using the <Button></Button> tag.

Press + to interact
import React from 'react';
import { Button } from 'react-native';
const App = () => {
return (
<Button title="Press Me"></Button>
);
}
export default App;

Styling

The ...