* Some cleanup
- `if/guard let x = x` -> `if/guard let x`
- Remove unneeded `self` from a few demos
- Fix up some presentation logic in TicTacToe
* Update Examples/TicTacToe/tic-tac-toe/Sources/LoginUIKit/LoginViewController.swift
* wip
* wip
* wip
* Internal: rename `Store.{state,stateSubject}`
Both an internal readability win and will make it easier to provide a
public `state` property in the future.
* wip
* Re-introduce legacy alert and action sheet APIs
With 1.0 we removed `View.alert(_ store:dismiss:)`, which was a
problematic API. It used different SwiftUI alert APIs depending on OS
version, which led to different runtime behavior for apps using it
depending on the OS and an unfixable bug:
https://github.com/pointfreeco/swift-composable-architecture/issues/1981
This was reason enough to remove the API, but it was also an API that
predated the Composable Architecture's navigation tools. This meant it
awkwardly took an explicit `dismiss:` action, and it was up to the
developer to remember to use this action to manually clear out state.
The Composable Architecture's navigation tools handle dismissal
automatically once integrated, but also only support iOS 15 alerts at
the moment.
This PR addresses the above: it introduces view modifiers for the old
iOS 13 style of alert (and `actionSheet`) providing some presentation
domain, and it will automatically dismiss these modals accordingly:
- It adds `View.legacyAlert(store:)`. While we don't love
`legacyAlert`, we haven't come up with a better option. We need a
statically unique view modifier, and `alert(store:)` is already in
use for iOS 15. We're open to suggestions here, though!
- It adds `View.actionSheet(store:)`.
* wip