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

Comparing children using fast equal check instead of just length #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bimusiek
Copy link

With previous implementation, when children changed the animation did not work. This PR fixes that.

@bimusiek
Copy link
Author

Theoretically children can be string, null etc. And I am expecting here components with key property so there is obviously room for improvement.

@bitworking
Copy link
Owner

Thanks for the PR. I think we need a real deep check here. There are 2 problems with your solution:

  1. If the children don't have keys (e.g. only one child) it will result in an error and will break current projects
  2. Many people use the array index for the key, so we will have the same problem as before

I hope I'll find some time in the next days, so I'll try to implement a real deep equal check.

Copy link
Owner

@bitworking bitworking left a comment

Choose a reason for hiding this comment

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

We need another deep equal check. See comment.

@bitworking
Copy link
Owner

@bimusiek
Copy link
Author

Ha, I haven’t thought about looking for existing package. Just went with simplest approach for my needs. I will see if I have time over the weekend, then I can submit better PR.

All you comments are obviously valid 👍

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