@ViewInvalidating property wrapper

Hi all,

Apple added a new @Invalidating property wrapper to UIKit/AppKit this year, which you can learn more about by watching the "What's new in AppKit" WWDC talk. I really like this property wrapper as it helps remove some boilerplate code. Unfortunately, it requires a deployment target of iOS 15+/tvOS 15+/macOS 12+.

So, I decided to back-port it so people can use it with older deployment targets. You can find it here - https://github.com/theblixguy/Invalidating.

It effectively works the same way as Apple's version (same naming, types, etc) which means that when you bump your project's deployment target to iOS 15+/tvOS 15+/macOS 15+ you can just drop this package after making a few minor changes (done automatically via fix-its :sparkles:)

Let me know what you think and please feel free to open issues/PRs on the repo if you have any suggestions or improvements :)

13 Likes

So, so cool! And the code is very enlightening to read. Congratulations on the release! :blush:

1 Like
Terms of Service

Privacy Policy

Cookie Policy