I found it weird that the rendered contents are defined in a property instead of a function. Why not a render function instead of body? Or even better, why not just return the body from a function?
One thing I noticed is how little docs/sources for testing swiftui components. I guess testing is not too important for swiftui folks.
It's true - there's basically nothing about testing in the docs. But it's still in beta, and I suspect these details will be flushed out soon. In general I find the docs really limited, actually. Besides their main tutorial, learning some basic patterns has been quite the challenge.
I'm curious as to why they define a property vs a function. Wish I knew more about Swift to make an informed guess!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It’s amazing how much Swiftui resembles react.
I found it weird that the rendered contents are defined in a property instead of a function. Why not a render function instead of body? Or even better, why not just return the body from a function?
One thing I noticed is how little docs/sources for testing swiftui components. I guess testing is not too important for swiftui folks.
It's true - there's basically nothing about testing in the docs. But it's still in beta, and I suspect these details will be flushed out soon. In general I find the docs really limited, actually. Besides their main tutorial, learning some basic patterns has been quite the challenge.
I'm curious as to why they define a property vs a function. Wish I knew more about Swift to make an informed guess!