Button

Button is the most important part in react native

For using button we have to use single line

<Button title="Press" />

ex: import React from 'react'; import { View, Text, Button } from 'react-native'; const App = () => ( <View> <Text style={{ margin: 64 }}> Button Video </Text> <Button title="Press" color={'green'}/> </View> ); export default App;

for passing parameter we can use this type of function in button import React from 'react'; import { View, Text, Button } from 'react-native'; const fruit =() =>{ console.warn("Function called") } const App = () => ( <View> <Text style={{ margin: 64 }}> Button Video </Text> <Button title="Press" onPress={()=>fruit()} color={'green'}/> </View> ); export default App;