# getRecommendation()

> The shopper's recommended size for a product, in your size labels.

Source: https://docs.tryyoursize.com/reference/react-native/get-recommendation/

*Function* · `@tryyoursize/react-native`

The shopper's recommended size for a product, in your size labels. Never starts a simulation.

```ts
async function getRecommendation(product: string): Promise<Recommendation>
```

## Parameters

- **`product`** (`string`, required): Your product ID or SKU.

## Returns

`Promise<Recommendation>`: The shopper's recommended size.

- **`product`** (`string`, required)
- **`status`** (`RecommendationStatus`, required): `none`: simulated, no size can be worn. Same values as the web SDK.
- **`size`** (`string | null`, required): The recommended size in your size labels, or null.
- **`studioSize`** (`string | null`, required): The same size as entered in TryYourSize Studio, or null.
- **`wearableSizes`** (`string[]`, optional): Sizes that can be worn on this body, in your labels (when simulated).

## Example

**React Native**

```tsx
const rec = await getRecommendation("SKU-123");
if (rec.status === "ready") setSize(rec.size);
```

**Swift**

```swift
let rec = try await tys.recommendation(for: "SKU-123")
if rec.status == .ready, let size = rec.size { selectedSize = size }
```

**Kotlin**

```kotlin
lifecycleScope.launch {
    val rec = tys.recommendation("SKU-123")
    if (rec.status == Recommendation.Status.READY) selected = rec.size
}
```

**Flutter**

```dart
final rec = await tys.recommendation('SKU-123');
if (rec.status == RecommendationStatus.ready) setState(() => size = rec.size);
```
