Screens - Compose
The Compose integration provides dedicated Composables for registering Screens declaratively. Make sure you have added the Compose dependency as described in Get Started.
CorynScreenRoot
Wrap your screen content with CorynScreenRoot. The Screen is registered and deregistered automatically as the Composable enters and leaves the composition.
CorynScreenRoot(name = "OfferDetails", arguments = bundleOf("title" to "Gothic 2")) {
...
}
CorynScreenStateProviderRoot
When a Screen also needs a State Provider, use CorynScreenStateProviderRoot to avoid unnecessary nesting. It combines CorynScreenRoot and CorynStateProviderRoot into a single Composable:
- CorynScreenStateProviderRoot (recommended)
- Separate nesting (equivalent)
CorynScreenStateProviderRoot<LinkedOffersState>(
screenName = "OfferDetails",
arguments = bundleOf("title" to "Gothic 2"),
stateId = "LinkedOffers"
) {
...
provideCorynState { LinkedOffersState(...) }
...
}
CorynScreenRoot(name = "OfferDetails", arguments = bundleOf("title" to "Gothic 2")) {
CorynStateProviderRoot<LinkedOffersState>(stateId = "LinkedOffers") {
provideCorynState { ... }
}
}
Minimum Compose 1.8.0 (BOM 2025.04.01); recommended 1.9.3 (BOM 2025.10.00) or newer — see Introduction.
Screen arguments support String, Number, and Boolean values. They are recorded data and are not redacted by visual privacy masks; avoid sensitive values. See screen naming guidelines.