Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Make sure React knows that each image is a unique entity#7

Merged
benhowell merged 1 commit intobenhowell:masterfrom
cust0dian-old:fix-wrong-aspect-ratio-on-images-change
Sep 10, 2016
Merged

Make sure React knows that each image is a unique entity#7
benhowell merged 1 commit intobenhowell:masterfrom
cust0dian-old:fix-wrong-aspect-ratio-on-images-change

Conversation

Copy link
Contributor

cust0dian-old commented Sep 10, 2016 *
edited
Loading

Right now React assumes that images differ only by their index and just switches the src attribuite when images change, leading to weird display bug while new images load:

I think using URLs as keys should be the optimal solution here.

(Code from the PR #6 can be used to test this as well)

benhowell merged commit 249f9f3 into benhowell:master Sep 10, 2016
Copy link
Owner

benhowell commented Sep 10, 2016

Another nice pickup, cust0dian!
Merged

benhowell mentioned this pull request Sep 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants