Replies: 1 comment 8 replies
-
Hello! Perhaps, you are looking to pass a result back to a previous component, not just data. If so, I recommend to use the power of usual callbacks passed via constructor. Your component class B(private val onFinished: (SomeResult) -> Unit) Then the parent component (e.g. Please see the related discussion in the "old" parent repository: badoo/Decompose#201 |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
Is there a best/recommended way to pass data between instances of router? (instance here is
T
inRouter<C, T>
)Example: I have components
A
andB
(editor ofA
)B
is opened fromA(x)
, I want to editx
toy
and then pass it back toA
(stack:[A(x)] → [B(x), A(x)] → [B(y), A(x)] → [A(y)]
)B
is opened from other places (i.e. creates newA
), I want to editnew
toy
, closeB
and createA(y)
(stack:[C] → [B(new), C] → [B(y), C] → [A(y), C]
)Beta Was this translation helpful? Give feedback.
All reactions