# MultiBlocProvider

```kotlin
@Composable fun Screen.MultiBlocProvider()
```

or

```kotlin
@Composable fun Screen.BlocProviders()
```

define multiple [BlocProvider](https://beyondeye.gitbook.io/compose-bloc/bloc-documentation/blocprovider#screen.blocprovider)s to make multiple [Blocs ](https://beyondeye.gitbook.io/compose-bloc/bloc-documentation/bloc-and-cubit-overview/bloc)available to some composable subtree&#x20;

The syntax for defining the list of BlocProviders is as follows:

```kotlin
MultiBlocProvider()
    .BlocProvider { scope -> BlocA() }
    .BlocProvider { scope -> BlocB() }
    .forContent { content() }
```

&#x20; where `content()` is a composable function. for which we want the blocs made available

&#x20;Any number of `BlocProviders` definitions is supported

The syntax of each `BlocProvider` in the list is the same as the syntax of a single `BlocProvider`, that is there are two options:

```kotlin
inline fun <reified BlocA: BlocBase<*>> BlocProvider(
        crossinline create: @DisallowComposableCalls (cscope: CoroutineScope) -> BlocA
    ) 
```

for creating a Bloc bound the lifecycle of the current [Screen](https://beyondeye.gitbook.io/compose-bloc/navigator-documentation/navigator-overview/screen), or

```kotlin
inline fun <reified BlocA: BlocBase<*>> BlocProviderExt(
        externallyProvidedBlock:BlocA,
    )
```

for specifying a Bloc whose lifecycle is managed by some other `Screen`.
