Michael Long
Nov 5, 2022

--

Article would have been much clearer if it has started with "Rarely used or known, SubscriptionView is a SwiftUI 1.0 view that directly subscribes to a publisher."

Then "SubscriptionView directly subscribes to the publisher, whereas our own view needs a onReceive modifier whose value must also be stored in our own state object."

The later makes the benefit somewhat clearer.

Thanks for pointing this one out, however. Sucker's been around forever but I never knew about it.

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

Responses (1)