ZFost
(Zach)
1
How can I achieve animation with
.binding(\.$bindableStateVar)?
I'm currently making my own Bindings
Binding(get: { viewStore.stateVar }, set: { viewStore.send(.updateStateVar, animation: .myAnimation) })
but I would like to use the BindableAction/BindableState setup if possible.
tgrapperon
(Thomas Grapperon)
2
viewStore.binding(\.$bindableStateVar)
is a Binding
. You can turn it into an animated one using the .animation()
method, like any vanilla Binding
:
viewStore.binding(\.$bindableStateVar).animation(…)
2 Likes