Add React Native app

This commit is contained in:
2024-06-26 22:14:36 -04:00
parent 03e5a27b4e
commit e41ca163a5
26 changed files with 19967 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
import { Stack } from "expo-router";
export default function RootLayout() {
return (
<Stack>
<Stack.Screen name="index" options={{ title:'Hello World!'}}/>
</Stack>
);
}

33
reactNative/app/index.tsx Normal file
View File

@@ -0,0 +1,33 @@
import { Text, View, Button } from "react-native";
import React, {useState} from 'react';
import { ThemedText } from "@/components/ThemedText"
import Blurb, {BlurbData} from "@/components/Blurb"
const default_blurb: BlurbData = {
title: "Fart Man Comes To Town!",
blurb: "Will this controversial figure finally cause the downfall of the town? Sally Smith from town center says that she can already smell trouble brewing but other members of the town believe the imminent winds of change will revitalize the towns central business district."
};
export default function Index() {
const [blurbs, setBlurbs] = useState([default_blurb])
return (
<View
style={{
flex: 1,
justifyContent: "center",
alignItems: "center",
}}
>
{blurbs.map((blurb, i) => (
<Blurb key={i} {...blurb} />
))}
<Button
onPress={() => {
setBlurbs(blurbs.concat([default_blurb]));
}}
title="Load More"
/>
</View>
);
}