Landry Norris
05/24/2022, 9:42 PMLandry Norris
06/02/2022, 6:52 PMCannot access 'com.arkivanov.decompose.ComponentContext' which is a supertype of 'com.example.myapp.component.TrimComponent'. Check your module classpath for missing or conflicting dependencies
The normal build process runs just fine, there’s no errors showing up in the IDE, and the app works, but I can’t publish my library because maven-publish tasks rely on the metadata task. I have some parts of the app set up as a library that the main app pulls in.Emanuel Moecklin
06/16/2022, 5:06 AMAdam Brown
06/27/2022, 10:12 PMAdam Brown
06/30/2022, 5:40 PMdoubov
07/08/2022, 7:33 PMStuie
07/08/2022, 11:57 PMScreenConfig
sealed class for navigation, and a ComponentContext.router
that constructs the screen that is needed for every pop
and push
. This all works fine for a single window application, but now that I want a second window I'm having some trouble. I created a @Composable
with a Window
at the top-level, created an entry in the ScreenConfig
for it, as I did for other navigation destinations. When that destination is reached the initial window content becomes blank, and the new window appears correctly. I've used GitHub search but haven't managed to find a sample repository that handles multiple windows with Decompose. The only documentation I can find is unrelated Decompose.Arkadii Ivanov
07/12/2022, 9:20 AMRouter
API - the childFactory
callback is called during the Router
initialization, and it's not possible to obtain the `Router`'s reference safely from the callback.
E.g. consider the following snippet:
private val router =
router(initialConfiguration = Config.Main) {
// Can't use router here
}
Also when using separate function for the child factory, there is a foot gun:
private val router = router(initialConfiguration = Config.Main, childFactory = ::child)
private fun child(...): Child {
// The router property may be null at this point
DetailsComponent(onFinished = router::pop) // This may crash with NPE when onFinished is called
DetailsComponent(onFinished = { router.pop() }) // This is OK
}
I have been working on the new API for a couple of weeks, there are multiple ideas with various pros and cons. The API on the screenshot is what I liked the most. The idea is to introduce separate ChildNavigator
entity which is just a relay of navigation events. The childStack
function subscribes to ChildNavigator
events and handles all the routing job, and returns Value<ChildStack>
. ChildStack
is essentially the same thing as RouterState
currently. This way we have the reference to ChildNavigator
beforehand. But there is no such a single entity as Router
that could navigate
and provide RouterState
at the same time.
What do you think?Adam Brown
07/14/2022, 6:20 AMArkadii Ivanov
07/16/2022, 9:55 AMRouter
and introduced Child Stack
- Deprecated ValueObserver
typealias
Release notes and migration tips - https://github.com/arkivanov/Decompose/releases/tag/0.8.0Adam Brown
07/19/2022, 7:48 AMNorbi
07/20/2022, 11:50 AMYogeshvu
07/25/2022, 7:57 PMbartosz.malkowski
07/29/2022, 1:08 PMHttpClient
to many components and I'm curious how to do it in right way.
I can use global val
, but somehow I feel it is not right way (I'm old Java developer 😉)
I tried to use Koin, but I'm not sure it is not too big tool for that small thing. Especially I'm not sure if it is possible to put components into Koin modules.
Any advice? 🙂 Thanks in advance!Landry Norris
08/02/2022, 6:24 PMArkadii Ivanov
08/05/2022, 12:33 PMMarc
08/24/2022, 11:11 AMPhil Saul
08/28/2022, 12:26 PMAdam Brown
09/10/2022, 5:51 AMstack.value.active
Arkadii Ivanov
09/17/2022, 9:11 PMValue
. Currently it is defined as abstract class Value<out T : Any>
. But sometimes it would be useful to have something like Value<String?>
, instead of wrapping into something like Value<Optional<String>>
.
The reason of that limitation is the interop with Swift - generics in interfaces are not supported, and a class with <T>
is always nullable. But it feels that Swift is not needed for everyone, there are projects without Swift but with Android/desktop/Web/compose-ios etc.
I got an idea to make Value
a normal interface, and at the same time keep the interop with Swift.
interface Value<T>
With additional classes:
abstract class ReqValue<T : Any> : Value<T>
and
abstract class OptValue<out T : Any> : Value<T?>
And two extension functions:
<T : Any> Value<T>.asRequired(): ReqValue<T>
<T : Any> Value<T?>.asOptional(): OptValue<T>
So, if Swift is not needed - it's ok to just use Value
. But if Swift is needed - one should expose ReqValue
or OptValue
. This looks more flexible - e.g. it will be possible to expose both <T>
and <T?>
to Swift, and it will be type-safe. But also a bit more verbose in case of Swift.
What do you think, 👍 or 👎?Arkadii Ivanov
10/03/2022, 12:59 PM1.0.0-alpha-05
is released!
• Added new navigation model - Child Overlay
(#217, #218, #220)
• Disallow destroying child ComponentContext
(#215)
• Derive default values of stack and overlay keys from configuration class simpleName
(#224)
• Added extensions for Value<ChildStack>
(#203)
• Updated Kotlin to 1.7.10
, MPP Compose to 1.2.0-beta02
, Jetpack Compose to 1.2.1
(#211, #223)
• Updated Essenty to 0.6.0
(#219)
Release notes - https://github.com/arkivanov/Decompose/releases/tag/1.0.0-alpha-05Ryan Woodcock
10/14/2022, 4:12 AMAdam Brown
10/21/2022, 11:11 PMsubscribeAsState()
extension?oianmol
10/23/2022, 7:54 AMarm64 = null, // Comment out to enable arm64 target
I’m trying to use com.arkivanov.decompose:extensions-compose-jetbrains:1.0.0-alpha-06-native-compose
Arkadii Ivanov
10/25/2022, 8:27 AM1.0.0-alpha-07
is released!
• Added children
Generic Navigation model (#241, #242, #243, #245)
• Added replaceAll
extension function for StackNavigator
(#229 by @Tommyten)
• Updated Kotlin to 1.7.20
, JetBrains Compose to 1.2.0
, Jetpack Compose to 1.3.2
(#233, #236)
Full release notes - https://github.com/arkivanov/Decompose/releases/tag/1.0.0-alpha-07Zsolt.bertalan
10/27/2022, 7:36 PMSlackbot
10/28/2022, 11:22 PMAdam Brown
10/29/2022, 12:03 AMObservableValue
when I navigate to another Child, it throws this exception, apparently when the previous child attempts to dereference it's state:
Uncaught Kotlin exception: kotlin.native.IncorrectDereferenceException: illegal attempt to access non-shared com.arkivanov.decompose.value.MutableValueImpl@34e6e8 from other thread
but I'm not doing an explicit threading, and I'm changing state based on a button click, so should be main that this is all happening on.Arkadii Ivanov
11/01/2022, 10:53 PMtheapache64
11/04/2022, 3:09 AM