# useReactNativePlatformComponents

Rule `biome/useReactNativePlatformComponents`. Ensure that platform-specific React Native components are only imported in files named for that platform.

- Source: biome
- Technologies: React
- Kind: correctness
- Needs type information: no
- Autofix: no
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #604 by reach, #239 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `correctness/useReactNativePlatformComponents` | yes | no | group correctness, since 2.4.13 | [docs](https://biomejs.dev/linter/rules/use-react-native-platform-components/) |

## Code examples

### Incorrect: the rule reports this

```js
import { ProgressBarAndroid } from "react-native";
```

```js
import { ActivityIndicatorIOS } from "react-native";
```

### Correct: the rule accepts this

```js
import { View } from "react-native";
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "correctness": {
        "useReactNativePlatformComponents": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [biome/useReactAsyncServerFunction](https://lintradar.dev/rules/biome/useReactAsyncServerFunction.md): Require functions with the "use server" directive to be async.
- [biome/useReactNativeValidPlatformColors](https://lintradar.dev/rules/biome/useReactNativeValidPlatformColors.md): Require `PlatformColor()` and `DynamicColorIOS()` calls to use values written directly in the call.
- [biome/useQwikValidLexicalScope](https://lintradar.dev/rules/biome/useQwikValidLexicalScope.md): Disallow unserializable expressions in Qwik dollar ($) scopes.
- [biome/useSimpleNumberKeys](https://lintradar.dev/rules/biome/useSimpleNumberKeys.md): Disallow number literal object member names which are not base 10 or use underscore as separator.
- [biome/useQwikMethodUsage](https://lintradar.dev/rules/biome/useQwikMethodUsage.md): Disallow `use*` hooks outside of `component$` or other `use*` hooks in Qwik applications.
- [biome/useSvelteEventDispatcherTypes](https://lintradar.dev/rules/biome/useSvelteEventDispatcherTypes.md): Require `createEventDispatcher` calls to declare the types of their events.

---

Web page: https://lintradar.dev/rules/biome/useReactNativePlatformComponents. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
