How to manage multiple sheets in SwiftUI

SwiftUI's sheet modifier enables us to modally present a sheet view when a given condition is true. It's a simple way of modally presenting content and works great when presenting a single sheet from a view. However, things get slightly more complicated when presenting multiple sheets based on different conditions. In his first SwiftUI post, Joe Masilotti describes how he solved the problem of presenting multiple sheets, showing us how he went from an initial solution to a final, more reusable implementation.