Avatar
すいません。こちらのスレッド色々見逃していました🙇🏻‍♂️ 発表時の補足なのですが、 StateObjectなどに関してはここにコメントがあって https://forums.swift.org/t/pitch-observation/62051/12 結論は「開発中なのでまだなんとも言えない」なんですけど、 @ Stateに対するStateObjectのように、XXXObjectは残るみたいですね。 all @*Object property wrappers will be able to be used as their non-object counterparts - i.e. where you used @StateObject before just @State etc. ただ、その下で、なるべくPropertyWrapperをつける作業は消したいようなことも言ってます。 the intent is to allow for when Observable is used developers need to consider fewer potential property wrappers and in the case where no lifetime specialities or bindings are needed and just plain observations are desired, no property wrapper is required. (edited)
Some of those details are still in flux and under active development with the SwiftUI folks. But the initial thought is that all @*Object property wrappers will be able to be used as their non-object counterparts - i.e. where you used @StateObject before just @State etc. Obviously since that is still under development to see if that works or no...
👀 3