Qustions: watch elements were added or removed
michal-minich opened this issue · 2 comments
I cannot find any functionality that would allow me to see elements that were pushed, removed, spliced etc...
I would find this very useful and looks to me like big omission. Also it does not looks complex to implemented - lot of time the element itself is part of the modifying-function argument.
What is your opinion?
Thank you.
btw - Is there any forum where to post questions?
The map()
method takes optional second and third parameters for items that have left the array or moved within it. Let me know if it works for you!
No forum, though I agree it would be a good idea. Honestly, I just haven't had the time to explore it. I know there's gitter, but don't know if it's the recommended tool right now or something else.
It works. Thank you. I would definitely not get it from looking at the API. It is quite unusual/low level, but it is probably because it reflect the underlying implementation. I will make simple arr.onAdd and arr.onRemove handlers based on this API for my purpose.