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

Fix losing pending card updates after asynchronous image load completion #143

Merged
merged 4 commits into from
Oct 7, 2021

Conversation

shangzhel
Copy link
Collaborator

@shangzhel shangzhel commented Oct 7, 2021

Using the functional form of the setter returned by useState will operate on the latest version of the state rather than the one captured by the closure.

If you look at the commit dates you will see that I had fixed this last week, I just never bothered to push it.

@shangzhel shangzhel added the bug Something isn't working label Oct 7, 2021
@shangzhel shangzhel self-assigned this Oct 7, 2021
@shangzhel shangzhel changed the title Fix losing pending card updates after asynchronous image loading Fix losing pending card updates after asynchronous image load completion Oct 7, 2021
Copy link
Owner

@chomosuke chomosuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

lgtm

@chomosuke chomosuke added this to the Sprint 2 milestone Oct 7, 2021
@chomosuke chomosuke removed this from the Sprint 2 milestone Oct 7, 2021
@shangzhel shangzhel merged commit 69995e2 into master Oct 7, 2021
@shangzhel shangzhel deleted the shangzhel/set-state-fix branch October 7, 2021 09:58
@waltervan00 waltervan00 added this to the Sprint 2 milestone Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update during loading, as loading finish update will be overwritten.
3 participants