Saturday, June 27, 2020

React Native Button example 2021

                                  Button

                In React Native, Button is used to perform a click event. It is one of the UI control component for handling touches. Button has the prop 'color' to change the color but you can not style it as Button does not support 'style' prop. You can’t set text like this <Button> txt</Button> but use the title property  <Button title="txt"/>
         Button has several props such as title, onPress, accessibilityLabel, etc. React Native button component imports the Button class of react native library.

Example:


Output:

When you click on the button this alert message display.



   
Previous Post
Next Post

post written by:

Hello guys, myself Pooja Tirmare. I want to share my knowledge with people so they can learn react native and make beautiful applications.