Preview in SwiftUI

Once you have finished the SwiftUI code, it is always a good idea to preview it before implement any function code. Luckily, such feature is natively supported by SwiftUI — PreviewProvider
:
Example of showing previews:
The preview:

Or if you prefer, we can use the fixed size:
Preview:

Originally published at https://needone.app on December 18, 2020.