Creating Your First Mobile App
Introduction: In this lesson, you’ll create a simple “Hello World” mobile app using ReactJS and Expo. This will help you get comfortable with the development process.
Step-by-Step Guide:
Step 1: Set Up Your Project
expo start
Step 2: Create the App Component
App.js
file in your code editor.import React from 'react';
import { Text, View, StyleSheet } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<Text style={styles.text}>Hello World!</Text>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#f0f0f0',
},
text: {
fontSize: 24,
color: '#333',
},
});
Step 3: Run Your App
Conclusion: Congratulations! You’ve just created your first mobile app using ReactJS and Expo. This simple app is a great starting point for building more complex applications. In the next section, we’ll dive deeper into React Native components and how to use them in your apps.