← スキル一覧に戻る

platform-code
by 0xsend
The Send App monorepo.
⭐ 33🍴 18📅 2026年1月23日
SKILL.md
name: platform-code description: Platform-specific code patterns for web vs native (.native.tsx files). Use when creating React components that need different implementations for web and React Native.
Platform-Specific Code Pattern
Send uses file extension conventions to handle web vs. native differences.
File Naming
| File | Purpose |
|---|---|
ComponentName.tsx | Shared logic OR web-specific implementation |
ComponentName.native.tsx | React Native specific implementation |
The bundler automatically resolves the correct file based on platform.
When to Create Platform Files
Create .native.tsx variants when:
- UI needs different native implementation
- Using platform-specific APIs or components
- Optimizing for platform performance characteristics
- Handling platform-specific UX patterns
Example: TokenActivityFeed
TokenActivityFeed.tsx # Web: uses RecyclerList (virtualized)
TokenActivityFeed.native.tsx # Native: uses FlatList (RN optimized)
Both files export the same API - platform bundler picks the right one.
Guidelines
- Keep APIs identical between platform variants
- Share types/interfaces in a separate file when needed
- Platform-specific hooks:
useX.ts/useX.native.ts - Prefer shared code; only split when necessary
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
✓フォーク
10回以上フォークされている
+5
○Issue管理
オープンIssueが50未満
0/5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です