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
Add key
to the items in the array (as $id
)
#40
Conversation
This way the key can be used to identify the items in the React output and tie updates back to the correct `child()`
Thanks for the PR @puf! Have you seen the discussion in #37? I think we should go with a more fully-fledged solution here. As noted in the issue, I'd like to do something very similar to what we do with AngularFire. Most notably, your solution won't work for primitive values since setting |
@jwngr quick double check here.... Case 2: array of primitives; you pass in: That it? Or am I missing something? Test cases most welcome. :-) |
Yup, that's pretty much it. That is what we do with AngularFire and I think it works out pretty well. |
OK. I got that one working easily, but of course then some of the original On Wed, May 27, 2015 at 3:03 PM, Jacob Wenger notifications@github.com
|
Sounds good. We definitely do need to update the test suite and will also probably need to list this as a breaking change. I'm totally up for doing that though since this is strictly improved functionality. |
@jwngr Update the tests and fixed a few more case. Back to you. |
Thank you for this! |
Thanks for this PR @puf! I made a few changes myself (renamed |
This way the key can be used to identify the items in the React output and tie updates back to the correct
child()
. See this fiddle for an example (clicking a Todo item removes it): https://jsfiddle.net/frankvanpuffelen/s27nz1hb/