Untitled

mail@pastecode.io avatar
unknown
javascript
7 months ago
509 B
1
Indexable
Never
import React from 'react'
import { Button, View, Text } from 'react-native'

export default function JSXExample1() {
    let myStr = "Welcome";

    return (
        <View style={{ marginTop: 100, flex: 1, alignItems: "center", justifyContent: 'flex-start' }}>
            <Text>Hello World</Text>
            <Button
                title="Click me"
                onPress={() => alert('Button clicked!')}
                color="blue"
            />
            <Text>{myStr}</Text>
        </View>
    )
}