Build a web-based React Native playground similar to Expo Snack that allows developers to write, preview, and share React Native code directly in the browser.
- Editor: Monaco-based code editor with TypeScript/JSX support
- Preview: Web-only execution using react-native-web
- File Management: Multi-file projects with file explorer
- Console: Real-time logs and errors
- Bundling: Metro-like transformation for npm dependencies
- Persistence: Shareable URLs and session storage
- Security: Sandboxed execution environment
- Native Preview: Android emulator streaming (Phase 8)
- Core Components: View, Text, Image, TextInput, ScrollView, FlatList, SectionList
- Touchables: TouchableOpacity, TouchableHighlight, Pressable
- Layout: StyleSheet, Dimensions, Platform (web)
- Hooks: useState, useEffect, useCallback, useMemo, etc.
- Navigation: Limited support via react-navigation web
- AsyncStorage: Web localStorage fallback
- Animations: react-native-web animations (limited)
- Gestures: Basic touch events only
- Native Modules: Camera, Location, Bluetooth, etc.
- Native Navigation: Native stack, bottom tabs hardware features
- Background Tasks: Push notifications, background fetch
- Device APIs: Haptics, sensors, biometrics
- Uses react-native-web for component rendering
- Executes in sandboxed iframe
- Instant feedback, no build required
- Full browser DevTools support
- Android emulator via WebRTC streaming
- Real device testing capabilities
- Touch event injection
- Full native API access
- Security: All code runs in sandboxed iframes with CSP headers
- Performance: Client-side bundling with caching
- Dependencies: npm packages resolved via CDN (unpkg/jsdelivr)
- Browser Support: Modern browsers only (Chrome, Firefox, Safari, Edge)
- ✅ Users can write React Native code in the browser
- ✅ Instant preview updates as they type
- ✅ Clear error messages for unsupported APIs
- ✅ Shareable project URLs
- ✅ Beautiful, intuitive UI matching modern code playgrounds