Skip to content

React Native compatibility layer (@w3cos/rn-compat) #19

@wangnaihe

Description

@wangnaihe

Module

New crate: w3cos-rn-compat

Description

Create a compatibility layer that maps React Native components to W3C OS equivalents, enabling easy migration of RN apps.

Mapping Table

React Native W3C OS
View Column/Row
Text Text
TouchableOpacity Button
ScrollView Column with overflow:scroll
Image Image
TextInput TextInput
StyleSheet.create Inline style objects
useState signal()
onPress onClick

Acceptance Criteria

  • Create crates/w3cos-rn-compat/ crate
  • Export RN-named components that delegate to W3C OS components
  • Compiler recognizes RN imports and maps them
  • A simple RN app can compile with minimal changes
  • Example: convert a real RN screen to W3C OS

Difficulty

Medium

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions