Kyle
08/27/2023, 12:57 AMZsolt
08/27/2023, 1:19 PMsingleTop
operation instead of push
on the top level back stack. If A or B already exists in the stack, it will restore that along with its node subtree:
https://bumble-tech.github.io/appyx/components/backstack/#single-top
This should be quick to change.
Alternatively, you could also use a Spotlight
instead of a BackStack
on the top level altogether, which keeps all of its children alive as a default. It’s only a minor layout detail whether it looks like a carousel or more like a full screen, so you could definitely use it in place of a back stack;
https://bumble-tech.github.io/appyx/components/spotlight/Jez
08/30/2023, 1:38 PMZsolt
09/08/2023, 10:03 AMpush
just stashes (but keeps the element alive).
However, the same is not true for a `pop`+`push` cycle as a default, since pop
actually destroys the element (and its subtree).
Additionally, since it is also possible to push
the same element multiple times into the stack, each would be resolved to a different instance (possibly different subtree), which would not fit Kyle’s case.
That’s where the other options in this specific use case are more helpful.