JSX stands for JavaScript XML.
In the example above, <View>
and <Text>
are JSX elements representing React Native components. The style
prop is used to apply styles to the components. Inside the <View>
component, there's a <Text>
component displaying the text "Hello, React Native!".
import React from 'react';
import { View, Text } from 'react-native';
const App = () => {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text>Hello, React Native!</Text>
</View>
);
};
export default App;
© www.thecoderjob.com. All Rights Reserved. Designed by HTML Codex