Skip to content
Discussion options

You must be logged in to vote

Hi @Paul-Svetlichny, I believe that problem is your use of withAnimation in the reducer. Unfortunately that does not work with @ObservableState, and in fact it does not even work with vanilla SwiftUI and @Observable. We filed a feedback about this during the beta period of iOS 17 and never heard back.

If you remove those does it work as you expect? And if you do need to perform animation in those actions you can instead send the actions with animation:

await send(.loadReport, animation: .easeIn(duration: 2))
await send(.updateReport, animation: .easeIn(duration: 2))

…or you can use the .animation(_:value:) modifier in the view.

And while I don't think it's the cause of any problems in this

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@Paul-Svetlichny
Comment options

@mbrandonw
Comment options

Comment options

You must be logged in to vote
4 replies
@mbrandonw
Comment options

Answer selected by Paul-Svetlichny
@Paul-Svetlichny
Comment options

@mbrandonw
Comment options

@Paul-Svetlichny
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants