// App.basic.tsx
/**
* BASIC STARTER TEMPLATE
*
* A minimal React Native app with simple navigation and no authentication.
* Perfect for prototyping or building from scratch.
*
* INCLUDED MODULES:
* - None (clean slate)
*
* FEATURES:
* - Basic 3-tab navigation (Home, About, Settings)
* - Simple card components
* - No authentication required
* - No theming system
* - TypeScript support
*
* DEPENDENCIES:
* - React Native core components only
*
* USE CASE: Quick prototypes, simple apps, learning React Native
*/
import React from 'react';
import { SafeAreaView, StyleSheet, View, Text, TouchableOpacity, ScrollView } from 'react-native';
import packageJson from './package.json';
// Basic Card component (simplified, no theming)
const BasicCard: React.FC<{ title: string; content: string }> = ({ title, content }) => (
{title}
{content}
);
// Basic navigation state
type Screen = 'home' | 'about' | 'settings';
export default function App() {
const appVersion = packageJson.version;
const appName = packageJson.name;
const [currentScreen, setCurrentScreen] = React.useState('home');
console.log(`\n\n\n\n==================================\n\n${appName} (Basic) started: version ${appVersion}\n\n==================================`);
const renderScreen = () => {
switch (currentScreen) {
case 'home':
return (
Welcome to {appName}
Basic Starter Template
);
case 'about':
return (
About
Learn more about this template
);
case 'settings':
return (
Settings
App configuration
);
default:
return (
Unknown screen
);
}
};
return (
{/* Header */}
Basic App
{/* Main Content */}
{renderScreen()}
{/* Bottom Navigation */}
setCurrentScreen('home')}
>
Home
setCurrentScreen('about')}
>
About
setCurrentScreen('settings')}
>
Settings
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#f5f5f5',
},
header: {
backgroundColor: '#ffffff',
paddingVertical: 16,
paddingHorizontal: 20,
borderBottomWidth: 1,
borderBottomColor: '#e0e0e0',
},
headerTitle: {
fontSize: 20,
fontWeight: '600',
color: '#333333',
textAlign: 'center',
},
content: {
flex: 1,
padding: 16,
},
welcomeSection: {
alignItems: 'center',
marginBottom: 24,
},
welcomeTitle: {
fontSize: 24,
fontWeight: 'bold',
color: '#333333',
textAlign: 'center',
marginBottom: 8,
},
welcomeSubtitle: {
fontSize: 16,
color: '#666666',
textAlign: 'center',
},
card: {
backgroundColor: '#ffffff',
borderRadius: 8,
padding: 16,
marginBottom: 16,
shadowColor: '#000',
shadowOffset: {
width: 0,
height: 2,
},
shadowOpacity: 0.1,
shadowRadius: 3.84,
elevation: 5,
},
cardTitle: {
fontSize: 18,
fontWeight: '600',
color: '#333333',
marginBottom: 8,
},
cardContent: {
fontSize: 14,
color: '#666666',
lineHeight: 20,
},
bottomNav: {
flexDirection: 'row',
backgroundColor: '#ffffff',
borderTopWidth: 1,
borderTopColor: '#e0e0e0',
paddingVertical: 8,
},
navButton: {
flex: 1,
paddingVertical: 12,
paddingHorizontal: 8,
alignItems: 'center',
},
navButtonActive: {
backgroundColor: '#007AFF',
marginHorizontal: 4,
borderRadius: 6,
},
navButtonText: {
fontSize: 14,
color: '#666666',
fontWeight: '500',
},
navButtonTextActive: {
color: '#ffffff',
fontWeight: '600',
},
errorContainer: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
errorText: {
fontSize: 18,
color: '#ff0000',
},
});