View
extension View
-
Displays an alert when then store’s state becomes non-
nil
, and dismisses it when it becomesnil
.Declaration
Swift
public func alert<Action>( _ store: Store<AlertState<Action>?, Action>, dismiss: Action ) -> some View
Parameters
store
A store that describes if the alert is shown or dismissed.
dismissal
An action to send when the alert is dismissed through non-user actions, such as when an alert is automatically dismissed by the system.