---
name: react-native-web-core
user-invocable: false
description: Use when working with React Native Web projects. Provides core concepts, components, and cross-platform patterns for building web applications with React Native.
allowed-tools:
- Read
- Write
- Edit
- Bash
- Grep
- Glob
---
# React Native Web - Core Concepts
React Native Web enables React Native components and APIs to run on the web, providing a unified codebase for web and native platforms.
## Key Concepts
### Platform Abstraction
React Native Web provides a consistent API across web and native platforms:
```typescript
import { View, Text, StyleSheet } from 'react-native';
export function MyComponent() {
return (
Works on web and native!
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
text: {
fontSize: 16,
color: '#333',
},
});
```
### Core Components
Use React Native primitives instead of HTML elements:
- `` instead of `
`
- `` instead of `` or `
`
- `` instead of ``
- `` instead of ``
- `` instead of scrollable `