Appearance
React Native
Build native mobile apps using React.
Overview
React Native lets you create truly native apps for Android and iOS using React.
Features
- Native performance
- Code sharing between platforms
- Hot reloading
- Component-based architecture
- Large ecosystem
- TypeScript support
Getting Started
bash
npx react-native@latest init MyProject
cd MyProject
npx react-native start
npx react-native run-android # or run-iosBasic Example
jsx
import React from 'react';
import { View, Text, Button, StyleSheet } from 'react-native';
const App = () => {
const [count, setCount] = React.useState(0);
return (
<View style={styles.container}>
<Text style={styles.text}>Count: {count}</Text>
<Button
title="Increment"
onPress={() => setCount(count + 1)}
/>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
text: {
fontSize: 24,
marginBottom: 20,
},
});
export default App;PAPER-CODE Integration
PAPER-CODE provides:
- React Native project templates
- Navigation setup
- State management
- Testing configurations