How can I prevent the modal content from going empty while the dismiss animation is still ongoing? #2004
-
Hey everyone! 👋🏻 This is because the For reference, please check out the following recording. .sheet(
isPresented: viewStore.binding(
get: \.isSheetPresented,
send: LoadThenPresent.Action.setSheet(isPresented:)
)
) {
IfLetStore(
self.store.scope(
state: \.optionalCounter,
action: LoadThenPresent.Action.optionalCounter
)
) {
CounterView(store: $0) // This is the ⬛️ page, and turns empty when dismiss() is called
}
} sheet.with.IfLetStore.mp4Does anyone have a good solution for maintaining the modal content while the dismiss animation is in progress? 🤔 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hey @Jager-yoo! There is a |
Beta Was this translation helpful? Give feedback.
Hey @Jager-yoo! There is a
returningLastNonNilValue
utility in that you can use to keep presenting the last non-nil value of State.Please note that the upcoming navigation utilities will handle this automatically.