Hugo_say, 6 months ago @simonbs I may have missed something in your different solutions but wouldn’t a Reference class that stores only one property at a time be a solution ? If you want multiple states to be grouped you can use @dynamicMemberLookup to make the solution more ergonomic (as presented in @sundell’s https://www.swiftbysundell.com/tips/combining-dynamic-member-lookup-with-key-paths/) image/jpeg
@simonbs I may have missed something in your different solutions but wouldn’t a Reference class that stores only one property at a time be a solution ?
If you want multiple states to be grouped you can use @dynamicMemberLookup to make the solution more ergonomic (as presented in @sundell’s https://www.swiftbysundell.com/tips/combining-dynamic-member-lookup-with-key-paths/)
image/jpeg