# ResultEffect

Common/All

## Functions summary

|---|---|---|
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable <T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/result/ResultEffect.composable#ResultEffect(androidx.navigation3.runtime.result.ResultEventBus,kotlin.coroutines.SuspendFunction1)( resultEventBus: https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/result/ResultEventBus, noinline onResult: suspend (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` An Effect to provide a result event between different screens | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable <T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/result/ResultEffect.composable#ResultEffect(kotlin.String,androidx.navigation3.runtime.result.ResultEventBus,kotlin.coroutines.SuspendFunction1)( resultKey: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, resultEventBus: https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/result/ResultEventBus, onResult: suspend (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` An Effect to provide a result event between different screens | Cmn |

## Functions

### ResultEffect

Cmn Artifact: [androidx.navigation3:navigation3-runtime](https://developer.android.com/jetpack/androidx/releases/navigation3) [View Source](https://cs.android.com/search?q=file:androidx/navigation3/runtime/result/ResultEffect.kt+function:ResultEffect)

```
@Composable
inline fun <T : Any?> ResultEffect(
    resultEventBus: ResultEventBus = LocalResultEventBus.current,
    noinline onResult: suspend (T) -> Unit
): Unit
```

An Effect to provide a result event between different screens

The trailing lambda provides the result from a flow of results.

| Parameters |
|---|---|
| `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?>` | the type of the result that should be retrieved from this effect |
| `resultEventBus: https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/result/ResultEventBus = LocalResultEventBus.current` | the ResultEventBus to retrieve the result from. The default value is read from the `LocalResultEventBus` composition local. |
| `noinline onResult: suspend (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | the callback to invoke when a result is received, captures the latest callback. |

### ResultEffect

Cmn Artifact: [androidx.navigation3:navigation3-runtime](https://developer.android.com/jetpack/androidx/releases/navigation3) [View Source](https://cs.android.com/search?q=file:androidx/navigation3/runtime/result/ResultEffect.kt+function:ResultEffect)

```
@Composable
fun <T : Any?> ResultEffect(
    resultKey: String,
    resultEventBus: ResultEventBus = LocalResultEventBus.current,
    onResult: suspend (T) -> Unit
): Unit
```

An Effect to provide a result event between different screens

The trailing lambda provides the result from a flow of results.

| Parameters |
|---|---|
| `resultKey: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | the key that should be associated with this effect |
| `resultEventBus: https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/result/ResultEventBus = LocalResultEventBus.current` | the ResultEventBus to retrieve the result from. The default value is read from the `LocalResultEventBus` composition local. |
| `onResult: suspend (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | the callback to invoke when a result is received, captures the latest callback. |