Skip to content

Commit 288912e

Browse files
committed
Add more info to KMP-NativeCoroutines section
1 parent 6413017 commit 288912e

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ In other cases you can access the `ViewModelScope.coroutineScope` property direc
4141

4242
### KMP-NativeCoroutines
4343

44-
Use the `@NativeCoroutinesState` annotation from KMP-NativeCoroutines
44+
Use the `@NativeCoroutinesState` annotation from [KMP-NativeCoroutines](https://github.com/rickclephas/KMP-NativeCoroutines)
4545
to turn your `StateFlow`s into properties in Swift:
4646

4747
```kotlin
@@ -52,6 +52,17 @@ val travelEffect = _travelEffect.asStateFlow()
5252
Checkout the [README](https://github.com/rickclephas/KMP-NativeCoroutines/blob/dev-1.0/README.md)
5353
for more information and installation instructions for KMP-NativeCoroutines.
5454

55+
<details><summary>Alternative</summary>
56+
<p>
57+
58+
Alternatively you can create extension properties in your iOS source-set yourself:
59+
```kotlin
60+
val TimeTravelViewModel.travelEffectValue: TravelEffect?
61+
get() = travelEffect.value
62+
```
63+
</p>
64+
</details>
65+
5566
## Android
5667

5768
Add the library to your Android module:

0 commit comments

Comments
 (0)