Skip to content

Commit f82b212

Browse files
authored
Merge pull request #971 from arkivanov/duplicate-configurations-docs
Updated docs for Duplicate Configurations
2 parents d34d31f + 53c2f0f commit f82b212

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

docs/faq.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,14 @@ This exception is thrown when duplicated component configurations are detected b
3737
- Prefer `pushNew` function instead of `push` when showing a component on a button click, it will properly handle accidental double clicks.
3838
- Prefer `pushToFront` to prevent duplicated components with the same data (configurations) in the stack.
3939

40-
### The experimental Duplicate Configurations mode
40+
### The Duplicate Configurations mode
4141

42-
You can also try enabling the experimental Duplicate Configurations mode using the following flag:
42+
!!!note
4343

44-
```kotlin
45-
DecomposeExperimentFlags.duplicateConfigurationsEnabled = true
46-
```
44+
The feature is stable since version `3.5.0-alpha01`.
4745

48-
This will allow having duplicate configurations in all navigation models. Please keep in mind that this feature is experimental.
46+
Most navigation models (such as Child Stack and Child Pages) can support duplication configurations. The feature is opt-in, it can be enabled via the [DecomposeSettings](https://github.com/arkivanov/Decompose/blob/master/decompose/src/commonMain/kotlin/com/arkivanov/decompose/DecomposeSettings.kt) `duplicateConfigurationsEnabled` global property since version `3.5.0-alpha01` or via `DecomposeExperimentFlags#duplicateConfigurationsEnabled` flag on earlier versions.
47+
48+
If this mode is enabled, Decompose will not throw errors when duplicate configurations are detected and will try its best to handle duplicates gracefully.
49+
50+
The only navigation model that does not support duplicate configurations is Child Items.

docs/navigation/items/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Similarly to other navigation models, each component created and managed by the
3030

3131
- Configurations must be unique (by equality) within `Child Items`.
3232

33-
### The experimental Duplicate Configurations mode
33+
### The Duplicate Configurations mode
3434

3535
Unlike other navigation models, the `Child Items` navigation model doesn't support the Duplicate Configurations mode. `IllegalStateException` is thrown if duplicate configurations are detected, regardless of the `DecomposeExperimentFlags.duplicateConfigurationsEnabled` flag.
3636

docs/navigation/pages/overview.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ Similarly to `Child Stack`, each component created and managed by the `Child Pag
2626

2727
- Configurations must be unique (by equality) within `Child Pages`.
2828

29-
### The experimental Duplicate Configurations mode
29+
### The Duplicate Configurations mode
3030

31-
You can also try enabling the experimental Duplicate Configurations mode using the following flag:
31+
!!!note
3232

33-
```kotlin
34-
DecomposeExperimentFlags.duplicateConfigurationsEnabled = true
35-
```
33+
The feature is stable since version `3.5.0-alpha01`.
34+
35+
The Child Pages navigation model can support duplication configurations. The feature is opt-in, it can be enabled via the [DecomposeSettings](https://github.com/arkivanov/Decompose/blob/master/decompose/src/commonMain/kotlin/com/arkivanov/decompose/DecomposeSettings.kt) `duplicateConfigurationsEnabled` global property since version `3.5.0-alpha01` or via `DecomposeExperimentFlags#duplicateConfigurationsEnabled` flag on earlier versions.
3636

37-
This will allow having duplicate configurations in all navigation models. Please keep in mind that this feature is experimental.
37+
If this mode is enabled, Decompose will not throw errors when duplicate configurations are detected and will try its best to handle duplicates gracefully.
3838

3939
### Initializing Child Pages
4040

docs/navigation/stack/overview.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ Each component created and managed by the `Child Stack` has a configuration, ple
2121

2222
- Configurations must be unique (by equality) within the `Child Stack`.
2323

24-
### The experimental Duplicate Configurations mode
24+
### The Duplicate Configurations mode
2525

26-
You can also try enabling the experimental Duplicate Configurations mode using the following flag:
26+
!!!note
2727

28-
```kotlin
29-
DecomposeExperimentFlags.duplicateConfigurationsEnabled = true
30-
```
28+
The feature is stable since version `3.5.0-alpha01`.
29+
30+
The Child Pages navigation model can support duplication configurations. The feature is opt-in, it can be enabled via the [DecomposeSettings](https://github.com/arkivanov/Decompose/blob/master/decompose/src/commonMain/kotlin/com/arkivanov/decompose/DecomposeSettings.kt) `duplicateConfigurationsEnabled` global property since version `3.5.0-alpha01` or via `DecomposeExperimentFlags#duplicateConfigurationsEnabled` flag on earlier versions.
3131

32-
This will allow having duplicate configurations in all navigation models. Please keep in mind that this feature is experimental.
32+
If this mode is enabled, Decompose will not throw errors when duplicate configurations are detected and will try its best to handle duplicates gracefully.
3333

3434
### Initializing the Child Stack
3535

0 commit comments

Comments
 (0)