ionic-to-expo

📁 patrickghidossi/ionic-to-expo 📅 6 days ago
2
总安装量
2
周安装量
#72964
全站排名
安装命令
npx skills add https://github.com/patrickghidossi/ionic-to-expo --skill ionic-to-expo

Agent 安装分布

claude-code 2
mcpjam 1
kilo 1
junie 1
windsurf 1
zencoder 1

Skill 文档

Ionic to Expo Migration

Convert Angular/Ionic/Capacitor projects to React Native/Expo.

Workflow

  1. Analyze – Read source TypeScript files, identify patterns
  2. Map – Match Ionic/Angular patterns to RN/Expo equivalents
  3. Convert – Generate equivalent React Native/Expo code
  4. Validate – Check for missing dependencies or incompatibilities

Conversion Process

When given Angular/Ionic source files:

  1. Identify the file type:

    • .component.ts → React functional component
    • .service.ts → Custom hook or context
    • .page.ts → Screen component
    • .module.ts → Usually not needed (note dependencies)
    • .guard.ts → Navigation guard logic
  2. Extract and convert:

    • Template (@Component.template) → JSX return statement
    • Styles (@Component.styles) → StyleSheet or styled-components
    • Inputs (@Input()) → Props
    • Outputs (@Output()) → Callback props
    • Lifecycle hooks → useEffect patterns
  3. Reference the mapping guides:

Quick Reference

Angular/Ionic React Native/Expo
@Component Function component
@Input() Props
@Output() Callback props
ngOnInit useEffect(..., [])
ngOnDestroy useEffect cleanup
ngOnChanges useEffect with deps
*ngIf {condition && <Component/>}
*ngFor .map()
[(ngModel)] value + onChangeText
[class.x]="cond" Conditional styles
(click) onPress
BehaviorSubject useState or context
Observable.pipe() Custom hooks

Output Format

When converting, provide:

  1. Converted code with equivalent functionality
  2. Required dependencies to install
  3. Migration notes for manual adjustments needed
  4. Type definitions if applicable

Anti-Patterns to Avoid

  • Don’t blindly translate class components; use hooks
  • Don’t create services as classes; use hooks/context
  • Don’t use any types; preserve TypeScript safety
  • Don’t ignore platform differences (iOS vs Android)