Skip to content
Back to skills

React Native Platform Specific

ASecurity

Handling iOS and Android differences with Platform API and native modules. Use when handling platform-specific behavior or integrating native modules in React Native. (triggers: **/*.tsx, **/*.ts, **/*.ios.*, **/*.android.*, Platform, Platform.select, native-module, ios, android)

  • 67 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 10, 2026
developmentswiftkotlinreactapi

Works with

  • api

Security analysis

A100/100

Scanned November 10, 2026

npx -y skills add ComeOnOliver/skillshub --skill react-native-platform-specific --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of React Native Platform Specific?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for React Native Platform Specific
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/comeonoliver-react-native-platform-specific/badge)](https://www.skillsdirectory.com/skills/comeonoliver-react-native-platform-specific)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: react-native-platform-specific
description: "Handling iOS and Android differences with Platform API and native modules. Use when handling platform-specific behavior or integrating native modules in React Native. (triggers: **/*.tsx, **/*.ts, **/*.ios.*, **/*.android.*, Platform, Platform.select, native-module, ios, android)"
---

# React Native Platform-Specific Code

## **Priority: P1 (OPERATIONAL)**

## File Extensions

Use `.ios.` and `.android.` for platform-specific files:

```text
Button.tsx          # Shared
Button.ios.tsx      # iOS-specific
Button.android.tsx  # Android-specific
```

React Native automatically picks the right file:

- **iOS**: Button.ios.tsx → Button.tsx (fallback)
- **Android**: Button.android.tsx → Button.tsx (fallback)

## Native Modules

- **Expo**: Use Expo modules when available (`expo-*` packages).
- **Bare RN**: Use community modules (`@react-native-community/*`).
- **Custom**: Write native modules in Swift/Kotlin when needed.

## Anti-Patterns

- **No Excessive Branching**: Extract to separate files if logic diverges.
- **No Hardcoded Version Checks**: Use feature detection.
- **No Ignoring Android**: Test on both platforms.

## References

See [references/native-modules.md](references/native-modules.md) for Platform detection examples, Native Bridge (iOS/Android), Expo JSI Modules, and SafeArea handling.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.