-
Hello, In our app, we'd like to treat alerts (of the kind you can just acknowledge with an OK button and do nothing else) separately from bona-fide presentations (sheets and stack presentations). Is it ok, then, to have something like struct State: Equatable {
// other state
@PresentationState var destination: Destination.State?
@PresentationState var alertState: AlertState<Never>?
} (with the corresponding actions and all the rest that go along with Should we do this, instead? struct State: Equatable {
// other state
@PresentationState var destination: Destination.State?
var alertState: AlertState<Never>?
} Many thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can use as many |
Beta Was this translation helpful? Give feedback.
You can use as many
@PresentationState
's as you want. Just remember to have the correspondingPresentationAction
andifLet
.