Skip to content

Allowing to enable animations within Observing and Collect into#192

Open
faogustavo wants to merge 2 commits into
touchlab:mainfrom
faogustavo:gv/swiftui-with-animation
Open

Allowing to enable animations within Observing and Collect into#192
faogustavo wants to merge 2 commits into
touchlab:mainfrom
faogustavo:gv/swiftui-with-animation

Conversation

@faogustavo

Copy link
Copy Markdown
  • Adds an extra parameter to Observing and collect(into:) that enables animation during the state changes
  • Behind the scenes, all it does is wrap the value change with a withAnimation using the given animation configuration

@faogustavo faogustavo self-assigned this Jun 9, 2026
@faogustavo faogustavo requested a review from TadeasKriz June 9, 2026 20:07
@faogustavo faogustavo force-pushed the gv/swiftui-with-animation branch from 670473d to 7736da0 Compare June 9, 2026 20:08
@faogustavo faogustavo removed their assignment Jun 9, 2026
@TadeasKriz

Copy link
Copy Markdown
Collaborator

There are also two other parameters to withAnimation: completionCriteria and completion. I wonder if we should have the API done in a way where the current one is without animations and another one that allows us to provide all the parameters. What do you think?

The withAnimation can also return a value, which I'm not sure is something we could use or not, just making sure you're aware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants