Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation update #602

Merged
merged 8 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 20 additions & 27 deletions docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,17 @@ Decompose provides a number of modules, they are all published to Maven Central

## The main Decompose module

The main functionality is provided by the `decompose` module. It contains some core features like [ComponentContext](../component/overview.md#componentcontext), [Child Stack](../navigation/stack/overview.md), etc.
The main functionality is provided by the `decompose` module. It contains some core features like:

### Gradle setup
- [ComponentContext](../component/overview.md#componentcontext) - provides API for components to manage lifecycle, state saving, etc.
- [Value](../component/overview.md/#value-and-mutablevalue-state-holders) - Multiplatform (Swift-friendly) observable state holder (allows observing state changes in the UI).
- [Child Stack](../navigation/stack/overview.md) - stack navigation model.
- [defaultComponentContext](../getting-started/quick-start.md/#android-with-compose) - creates a default `ComponentContext` attached to an Activity or Fragment on Android.
- And many other important APIs.

This module should be imported into build.gradle.kts for shared application module at `kotlin.sourceSets.commonMain.dependencies`.

If you are having Android module (androidApp or composeApp if using KMP Wizard) this dependency also needs to be added into build.gradle.kts for Android module at ```android.dependencies``` to allow Android code access to above functionality

=== "Groovy"

Expand Down Expand Up @@ -38,55 +46,40 @@ Compose is currently published in two separate variants:

Due to this fragmentation Decompose provides two separate extension modules for Compose:

- `extensions-compose-jetpack` - Android library for Jetpack Compose.
- `extensions-compose-jetbrains` - Kotlin Multiplatform library for Multiplatform Compose.

Both modules are used to connect Compose with Decompose components. Please see the corresponding [documentation page](../extensions/compose.md).

=== "Since v3.0.0-alpha01"

Since Decompose version v3.0.0-alpha01 there is just one extension module for Compose:

- `extensions-compose` - compatible with both Jetpack Compose and Multiplatform Compose.

The module is used to connect Compose with Decompose components. Please see the corresponding [documentation page](../extensions/compose.md).

### Gradle setup

=== "Before v3.0.0-alpha01"

Typically only one module should be selected, depending on the Compose variant being used.

=== "Groovy"

``` groovy
implementation "com.arkivanov.decompose:extensions-compose-jetpack:<version>"
// or
implementation "com.arkivanov.decompose:extensions-compose-jetbrains:<version>"
```

=== "Kotlin"

``` kotlin
implementation("com.arkivanov.decompose:extensions-compose-jetpack:<version>")
// or
implementation("com.arkivanov.decompose:extensions-compose-jetbrains:<version>")
```
Both modules are used to connect Compose with Decompose components. Please see the corresponding [documentation page](../extensions/compose.md). Typically only one module should be selected, depending on the Compose variant being used.


=== "Since v3.0.0-alpha01"

Since Decompose version v3.0.0-alpha01 there is just one extension module for Compose - compatible with both Jetpack Compose and Multiplatform Compose.

=== "Groovy"

``` groovy
implementation "com.arkivanov.decompose:extensions-compose:<version>"
```

=== "Kotlin"

``` kotlin
implementation("com.arkivanov.decompose:extensions-compose:<version>")
```

The module is used to connect Compose with Decompose components. Please see the corresponding [documentation page](../extensions/compose.md).
#### Support for Compose for iOS and Web (JS/Canvas and Wasm)

=== "Before v3.0.0-alpha01"
Expand Down Expand Up @@ -116,7 +109,7 @@ Compose is currently published in two separate variants:

## Extensions for Android views

The `extensions-android` module provides extensions to connect Android views based UI to Decompose components. Please head to the corresponding [documentation page](../extensions/android.md) for more information.
The `extensions-android` module provides extensions to connect Android views (older alternative to Compose UI) to Decompose components. Please head to the corresponding [documentation page](../extensions/android.md) for more information.

### Gradle setup

Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ markdown_extensions:
- pymdownx.critic
- pymdownx.details
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
- pymdownx.highlight
- pymdownx.inlinehilite
- pymdownx.keys
Expand Down