react native Functional component
App name ----- Test
component Name ------ App.js
function component very easy they don't mange their state.
they are simple javascript function
--------------------------------------------------------------------------------------------------------------------
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/
import React from 'react'
import { View, Text, Button, } from 'react-native';
const App = () =>{
function Welcome(){
alert("Hello React-Native King, How are You ")
}
return(
<View>
<Text>Function Component </Text>
<Button title="Click Me" onPress={Welcome}/>
</View>
)
}
export default App;

Comments
Post a Comment