-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
747 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# FAQ | ||
|
||
|
||
## Navigation-related | ||
|
||
#### **Q: How does Appyx Navigation relate to Jetpack Compose Navigation?** | ||
|
||
We wrote an article on this in the context of Appyx 1.x: [Appyx vs Jetpack Compose Navigation](https://medium.com/bumble-tech/appyx-vs-jetpack-compose-navigation-b91bd23369f2). | ||
|
||
Most of the same arguments apply to Appyx 2.x too. | ||
|
||
While Appyx represents a different paradigm, it can also co-exist with Jetpack Compose Navigation. This can be helpful if you want to use Appyx for in-screen mechanisms only, or if you plan to migrate gradually. | ||
|
||
See [Appyx + Compose Navigation](navigation/integrations/compose-navigation.md) for more details. | ||
|
||
--- | ||
|
||
#### **Q: How does Appyx Navigation compare against other solutions?** | ||
|
||
The core concepts of navigation in Appyx differ from most navigation libraries: | ||
|
||
1. You don't have a concept of the "screen" present in the model | ||
2. You can define your own navigation models using [Appyx Components](components/index.md) | ||
3. On the UI level you can transform what feels like the "screen" itself | ||
|
||
See [Model-driven navigation](navigation/concepts/model-driven-navigation.md) for more details. | ||
|
||
--- | ||
|
||
|
||
#### **Q: How can I navigate to a specific part of my Appyx tree?** | ||
|
||
In most cases [Implicit navigation](navigation/concepts/implicit-navigation.md) can be your primary choice, and you don't need to explicitly specify a remote point in the tree. This is helpful to avoid coupling. | ||
|
||
For those cases when you can't avoid it, [Explicit navigation](navigation/concepts/explicit-navigation.md) and [Deep linking](navigation/features/deep-linking.md) covers you. | ||
|
||
--- | ||
|
||
|
||
#### **Q: What about dialogs & bottom sheets?** | ||
|
||
You can use Appyx in conjunction with Accompanist or any other Compose mechanism. | ||
|
||
If you wish, you can model your own Modal with Appyx too. We'll add an example soon. | ||
|
||
|
||
--- | ||
|
||
|
||
## Using Appyx in an app | ||
|
||
|
||
#### **Q: Is it an all or nothing approach?** | ||
|
||
No, you can adopt Appyx gradually: | ||
|
||
- Plug an [Appyx Components](components/index.md) in to any screen and just use it as a UI component. | ||
- Plug it in to a few screens and substitute another navigation mechanism with it, such as [Jetpack Compose Navigation](navigation/integrations/compose-navigation.md) | ||
|
||
--- | ||
|
||
#### **Q: What architectural patterns can I use?** | ||
|
||
Appyx is agnostic of architectural patterns. You can use any architectural pattern in the `Nodes` you'd like. You can even use a different one in each. | ||
|
||
--- | ||
|
||
#### **Q: Can I use it with ViewModel?** | ||
|
||
Please see [Appyx + ViewModel](navigation/integrations/viewmodel.md). | ||
|
||
--- | ||
|
||
|
||
#### **Q: Can I use it with Hilt?** | ||
|
||
Please see [Appyx + DI frameworks](navigation/integrations/di-frameworks.md). | ||
|
||
--- | ||
|
||
## Performance-related | ||
|
||
#### **Q: Are `Nodes` kept alive?** | ||
|
||
In short: you can decide whether a `Node`: | ||
|
||
- is on-screen | ||
- is off-screen but kept alive | ||
- is off-screen and becomes destroyed | ||
|
||
Check the [Lifecycle](navigation/features/lifecycle.md#on-screen-off-screen) for more details. | ||
|
||
--- | ||
|
||
|
||
## On the project itself | ||
|
||
#### **Q: Is it production ready?** | ||
|
||
Appyx matured to its stable version in the `1.x` branch. | ||
|
||
The `2.x` branch is currently in alpha. | ||
|
||
We use Appyx at Bumble in production, and as such, we're committed to maintaining and improving it. | ||
|
||
--- | ||
|
||
## Other | ||
|
||
Have a question? Come over to **#appyx** on Kotlinlang Slack! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Appyx Interactions – KSP setup | ||
|
||
Defining `TargetUiStates` is easy, as demonstrated in [UI representation](ui-representation.md) | ||
|
||
```kotlin | ||
@MutableUiStateSpecs | ||
class TargetUiState( | ||
val position: Position.Target, | ||
val rotation: Rotation.Target, | ||
val backgroundColor: BackgroundColor.Target, | ||
) | ||
``` | ||
|
||
However, for every `TargetUiState`, there needs to exist a corresponding `MutableUiState` class containing the animation code. | ||
|
||
By adding the `@MutableUiStateSpecs` annotation, if you follow the below setup guide, you can have the Appyx KSP mutable ui state processor generate this class for you automatically. | ||
|
||
|
||
## Setup | ||
|
||
Works with **Kotlin 1.8.10**. For our migration to **Kotlin 1.9** please check: | ||
|
||
- [#547](https://github.com/bumble-tech/appyx/issues/547) - Upgrade Compose Multiplatform / Kotlin | ||
|
||
|
||
### Main `build.gradle` | ||
|
||
```kotlin | ||
plugins { | ||
id("com.google.devtools.ksp") version libs.versions.ksp.get() apply false | ||
// Alternatively: | ||
// id("com.google.devtools.ksp") version '1.8.0-1.0.8' apply false | ||
} | ||
``` | ||
|
||
### App `build.gradle` | ||
|
||
```kotlin | ||
plugins { | ||
id("com.google.devtools.ksp") | ||
} | ||
|
||
composeOptions { | ||
kotlinCompilerExtensionVersion = '1.4.3' | ||
} | ||
|
||
dependencies { | ||
ksp("com.bumble.appyx:mutable-ui-processor:{latest version}") | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.