Animation with BindingAction

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.

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

Thank you!