Skip to content

Function declares an opaque return type, but has no return statements in its body from which to infer an underlying type

Last updated on March 1, 2020

You will see this error if you forget to fulfill either of the two conditions:

1) A View is created but not returned

To fix the above, simply return it.

2) Components are not inside a container (eg: VStack, HStack, ZStack)

To fix the above, simply add it inside a container.

Published inSwiftUI

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © DaddyCoding 2020.