Closed hayleigh-dot-dev closed 3 months ago
I'm not sure I can really be of any help on the subject (because I have no idea on how the VDOM on Lustre is working actually), but if you think I can help on the subject, let me think, I'd be happy to do it 🙂
It's almost done! 😅
Actually it would be super helpful if you had a minimal repo that demonstrated the issue currently so I can verify things are working now!
We're close!
https://github.com/lustre-labs/lustre/assets/9001354/b7013490-fe38-4e2d-9179-1517611cc582
But removing elements messes everything up:
https://github.com/lustre-labs/lustre/assets/9001354/18220ed7-4f0a-472f-a94f-aada53eb6011
@ghivert go grab v4.1.0 and let me know if it works for you!
https://github.com/lustre-labs/lustre/assets/7314118/b4d5ae8a-6ed8-40ac-b861-892f9389b4e0
I had a little hard time to understand how to use element.keyed
, but it's working great! Thank you very much! You're the best!
Most frameworks have the concept of a "keyed" node that lets the DOM patching do an in-place update of elements with a stable id even if their position in a list changes. This is important for two reasons:
This was brought up by #79.