Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create binding form that does not set animation #12

Merged
merged 1 commit into from Mar 25, 2022

Conversation

gordonbrander
Copy link
Collaborator

@gordonbrander gordonbrander commented Mar 25, 2022

Previously if no animation was passed to binding, we would send withAnimation(nil). However, we don't want to set withAnimation(nil) unless explicitly asked, as this may override withAnimation called elsewhere.

Instead, we now introduce two forms of Store.binding:

Store.binding(get:tag:)
Store.binding(get:tag:animation:)

The first form does not call withAnimation, leaving the transaction state alone.

Previously if no animation was passed to binding, we would send
`withAnimation(nil)`. However, we don't want to set withAnimation(nil) as
this may override withAnimation called elsewhere.

Instead, we now introduce two forms of `Store.binding`:

Store.binding(get:set:)
Store.binding(get:set:animation:)

The first form does not call withAnimation.
@gordonbrander gordonbrander merged commit cdc6d1c into main Mar 25, 2022
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.

None yet

1 participant