lustre-labs / lustre

An Elm-inspired framework for building HTML templates, single page applications, and server-rendered components in Gleam!
https://hexdocs.pm/lustre
MIT License
738 stars 52 forks source link

Lustre server component produces incorrect patches for new elements. #76

Closed hayleigh-dot-dev closed 3 months ago

hayleigh-dot-dev commented 3 months ago

While putting together a collaborative whiteboard app, I noticed the client runtime was received updated patches for newly created nodes. This was causing runtime errors in the vdom code because updates are expected to have a previous node to diff against and there wasn't one!