Skip to content

Commit

Permalink
Replaced Jetpack Compose with just Compose in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
arkivanov committed Dec 23, 2023
1 parent f682031 commit b478453
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Check out the [template repository](https://github.com/arkivanov/decompose-multi

- [Decompose — experiments with Kotlin Multiplatform lifecycle-aware components and navigation](https://proandroiddev.com/decompose-experiments-with-kotlin-multiplatform-lifecycle-aware-components-and-navigation-a04ef3c7f6a3?source=friends_link&sk=f7d289cc329b6c8a765fc049e36c313f)
- [Fully cross-platform Kotlin applications (almost)](https://proandroiddev.com/fully-cross-platform-kotlin-applications-almost-29c7054f8f28?source=friends_link&sk=4619fdcb17912fde589bc4fca83efbbd)
- [A comprehensive thirty-line navigation for Jetpack/Multiplatform Compose](https://medium.com/p/5b723c4f256e) - if you find Decompose verbose and would prefer something built on top of Jetpack Compose.
- [A comprehensive thirty-line navigation for Jetpack/Multiplatform Compose](https://medium.com/p/5b723c4f256e) - if you find Decompose verbose and would prefer something built on top of Compose.

- "Component-based Approach" series by [Artur Artikov](https://twitter.com/artik_artikov)
- Part 1: [Fighting Complexity in Android Applications](https://medium.com/@a.artikov/component-based-approach-fighting-complexity-in-android-applications-2eaf5e8c5fad)
Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ Some functionality is actually provided by [Essenty](https://github.com/arkivano
Compose is currently published in two separate variants:

- The one developed and maintained by Google is Android only, called [Jetpack Compose](https://developer.android.com/jetpack/compose).
- The Kotlin Multiplatform variant of Jetpack Compose maintained by both JetBrains and Google, called it [Multiplatform Compose](https://github.com/JetBrains/compose-multiplatform).
- The Kotlin Multiplatform variant of Jetpack Compose maintained by both JetBrains and Google, called [Multiplatform Compose](https://github.com/JetBrains/compose-multiplatform).

=== "Before v3.0.0-alpha01"

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 JetBrains Compose, supports `android` and `jvm` targets
- `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](/Decompose/extensions/compose/).

Expand Down
14 changes: 7 additions & 7 deletions docs/getting-started/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface RootComponent
class DefaultRootComponent : RootComponent
```

It's often useful to extract an interface for a component. It makes it possible to create test doubles for integration tests (e.g. testing navigation in a container component), or fake implementations for UI previews (e.g. for Jetpack Compose or SwiftUI).
It's often useful to extract an interface for a component. It makes it possible to create test doubles for integration tests (e.g. testing navigation in a container component), or fake implementations for UI previews (e.g. for Compose or SwiftUI).

## ComponentContext

Expand Down Expand Up @@ -46,7 +46,7 @@ There are multiple ways of exposing an observable state from a component.

### Using Value from Decompose

Decompose provides an observable state holder - `Value`. It offers great integration with various UI frameworks, such as Jetpack Compose, SwiftUI, Kotlin/React, etc. You can also convert Reaktive `Observable` or coroutines `Flow` to `Value`, if needed.
Decompose provides an observable state holder - `Value`. It offers great integration with various UI frameworks, such as Compose, SwiftUI, Kotlin/React, etc. You can also convert Reaktive `Observable` or coroutines `Flow` to `Value`, if needed.

```kotlin
interface ListComponent {
Expand All @@ -72,9 +72,9 @@ class DefaultListComponent(
}
```

### Observing Value in Jetpack Compose
### Observing Value in Compose

Observing `Value` in Jetpack Compose is easy, just use the `subscribeAsState` extension function.
Observing `Value` in Compose is easy, just use the `subscribeAsState` extension function.

```kotlin
@Composable
Expand Down Expand Up @@ -275,7 +275,7 @@ Each child component is represented by a persistent configuration class. A confi
}
```

### Child Stack with Jetpack Compose
### Child Stack with Compose

```kotlin
@Composable
Expand Down Expand Up @@ -332,7 +332,7 @@ Please refer to [samples](/Decompose/samples/) for integrations with other UI fr

## Initializing a root component

### Android with Jetpack Compose
### Android with Compose

Use `defaultComponentContext` extension function to create the root `ComponentContext` in an `Activity` or a `Fragment`.

Expand All @@ -358,7 +358,7 @@ class MainActivity : AppCompatActivity() {
}
```

### Desktop with Jetpack Compose
### Desktop with Compose

Use `LifecycleController` to bind the root lifecycle with the main window state. See an example of `runOnUiThread` function here - [Utils.kt](https://github.com/arkivanov/Decompose/blob/master/sample/app-desktop/src/jvmMain/kotlin/com/arkivanov/sample/app/Utils.kt).

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## What is Decompose?

Decompose is a Kotlin Multiplatform library for breaking down your code into lifecycle-aware business logic components (aka BLoC), with routing functionality and pluggable UI (Jetpack Compose, Android Views, SwiftUI, Kotlin/React, etc.).
Decompose is a Kotlin Multiplatform library for breaking down your code into lifecycle-aware business logic components (aka BLoC), with routing functionality and pluggable UI (Compose, Android Views, SwiftUI, Kotlin/React, etc.).

### Supported targets

Expand Down
12 changes: 6 additions & 6 deletions docs/samples.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ This sample demonstrates the following features:
* Nested navigation
* State preservation (using `StateKeeper`)
* Retaining instances (using `InstanceKeeper`)
* Pluggable UI (Android Views, Jetpack Compose, SwiftUI, Kotlin/React)
* Pluggable UI (Android Views, Compose, SwiftUI, Kotlin/React)
* [Play Feature Delivery](https://developer.android.com/guide/playcore/feature-delivery) for Android
* Tests, including UI tests (Jetpack Compose)
* Tests, including Compose UI tests

Please note that Gradle files included in this sample project are not supposed to be used as a reference. They share the configuration with the reset of the library, which simplifies the maintenance a lot. Please refer to the [KMP documentation](https://kotlinlang.org/docs/multiplatform-mobile-getting-started.html) for information on configuring a KMP project. You can also check other sample projects described below.

Expand All @@ -26,9 +26,9 @@ Content:
* [ArticleDetailsComponent](https://github.com/arkivanov/Decompose/tree/master/sample/shared/shared/src/commonMain/kotlin/com/arkivanov/sample/shared/multipane/details) - displays the content of the selected article.
* [DynamicFeatures](https://github.com/arkivanov/Decompose/tree/master/sample/shared/shared/src/commonMain/kotlin/com/arkivanov/sample/shared/dynamicfeatures) - the Dynamic Features tab, it demonstrates the usage of [Play Feature Delivery](https://developer.android.com/guide/playcore/feature-delivery) on Android, while using classing integration on other platforms. There are two simple feature components - `Feature1` and `Feature2` - they are located in separate modules described below.
* [DynamicFeature](https://github.com/arkivanov/Decompose/tree/master/sample/shared/shared/src/commonMain/kotlin/com/arkivanov/sample/shared/dynamicfeatures/dynamicfeature) - a helper component responsible for loading dynamic feature components.
* [compose](https://github.com/arkivanov/Decompose/tree/master/sample/shared/compose) - this module contains Jetpack Compose UI.
* [compose](https://github.com/arkivanov/Decompose/tree/master/sample/shared/compose) - this module contains Compose UI.
* [dynamic-features/api](https://github.com/arkivanov/Decompose/tree/master/sample/shared/dynamic-features/api) - this module contains only API for dynamic feature components.
* [dynamic-features/compose-api](https://github.com/arkivanov/Decompose/tree/master/sample/shared/dynamic-features/feature1Impl) - this module contains only Jetpack Compose API for dynamic feature components.
* [dynamic-features/compose-api](https://github.com/arkivanov/Decompose/tree/master/sample/shared/dynamic-features/compose-api) - this module contains only Compose API for dynamic feature components.
* [dynamic-features/feature1Impl](https://github.com/arkivanov/Decompose/tree/master/sample/shared/dynamic-features/feature1Impl) - contains the implementation of `Feature1` dynamic feature component. On Android it depends on `android-app` module and is used via reflection. On all other targets, the `shared` module directly depends on this module and no reflection is used.
* [dynamic-features/feature2Impl](https://github.com/arkivanov/Decompose/tree/master/sample/shared/dynamic-features/feature2Impl) - contains the implementation of `Feature2` dynamic feature component. On Android it depends on `android-app` module and is used via reflection. On all other targets, the `shared` module directly depends on this module and no reflection is used.
* [Android sample app](https://github.com/arkivanov/Decompose/tree/master/sample/app-android)
Expand All @@ -39,7 +39,7 @@ Content:
* [RootComponentIntegrationTest](https://github.com/arkivanov/Decompose/tree/master/sample/shared/shared/src/commonTest/kotlin/com/arkivanov/sample/shared/root/RootComponentIntegrationTest.kt) - integration tests for `RootComponent`, including navigation tests.
* [CountersComponentIntegrationTest](https://github.com/arkivanov/Decompose/tree/master/sample/shared/shared/src/commonTest/kotlin/com/arkivanov/sample/shared/counters/CountersComponentIntegrationTest.kt) - integration tests for `CountersComponent`, including navigation tests.
* [CounterComponentTest](https://github.com/arkivanov/Decompose/tree/master/sample/shared/shared/src/commonTest/kotlin/com/arkivanov/sample/shared/counters/counter/CounterComponentTest.kt) - unit tests for `CounterComponent`. Includes supplying test dependencies, tests for instance retaining and state preservation, etc.
* [CounterContentTest](https://github.com/arkivanov/Decompose/tree/master/sample/shared/compose/src/jvmTest/kotlin/com/arkivanov/sample/shared/counters/counter/CounterContentTest.kt) - UI tests (Jetpack Compose) for `CounterComponent`.
* [CounterContentTest](https://github.com/arkivanov/Decompose/tree/master/sample/shared/compose/src/jvmTest/kotlin/com/arkivanov/sample/shared/counters/counter/CounterContentTest.kt) - Compose UI tests for `CounterComponent`.

!!!warning
The Multi-Pane sample is only for advanced single-pane/multi-pane navigation and layout. For generic master-detail navigation please refer to the Sample Todo List App described below.
Expand Down Expand Up @@ -92,7 +92,7 @@ A sample Android project demonstrating the use of Decompose library together wit

- [Decompose — experiments with Kotlin Multiplatform lifecycle-aware components and navigation](https://proandroiddev.com/decompose-experiments-with-kotlin-multiplatform-lifecycle-aware-components-and-navigation-a04ef3c7f6a3?source=friends_link&sk=f7d289cc329b6c8a765fc049e36c313f)
- [Fully cross-platform Kotlin applications (almost)](https://proandroiddev.com/fully-cross-platform-kotlin-applications-almost-29c7054f8f28?source=friends_link&sk=4619fdcb17912fde589bc4fca83efbbd)
- [A comprehensive thirty-line navigation for Jetpack/Multiplatform Compose](https://medium.com/p/5b723c4f256e) - if you find Decompose verbose and would prefer something built on top of Jetpack Compose.
- [A comprehensive thirty-line navigation for Jetpack/Multiplatform Compose](https://medium.com/p/5b723c4f256e) - if you find Decompose verbose and would prefer something built on top of Compose.

- "Component-based Approach" series by [Artur Artikov](https://twitter.com/artik_artikov)
* Part 1: [Fighting Complexity in Android Applications](https://medium.com/@a.artikov/component-based-approach-fighting-complexity-in-android-applications-2eaf5e8c5fad)
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ site_name: Decompose
site_url: https://arkivanov.github.io/Decompose
site_author: Arkadii Ivanov
site_description: >-
Kotlin Multiplatform lifecycle-aware business logic components (aka BLoCs) with routing functionality and pluggable UI (Jetpack Compose, SwiftUI, JS React, etc.)
Kotlin Multiplatform lifecycle-aware business logic components (aka BLoCs) with routing functionality and pluggable UI (Compose, SwiftUI, JS React, etc.)
# Repository
repo_name: arkivanov/Decompose
Expand Down

0 comments on commit b478453

Please sign in to comment.