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 )
Let me know what you think and please feel free to open issues/PRs on the repo if you have any suggestions or improvements :)