This might be doable as an extension of recalculateInternals; if all creation logic is done there, then the element doesn't need to be recreated from the ground up with all of the implications for serialization and reference tracking.
Elements should store their original props
There might be space issues with lots of elements, and using the passed props object might lead to problems if the original object is mutated. Props could perhaps be serialized - is there a way to serialize/deserialize table references?
:recreate should accept a table of keys/values to change while recreating the element
This might be doable as an extension of
recalculateInternals
; if all creation logic is done there, then the element doesn't need to be recreated from the ground up with all of the implications for serialization and reference tracking.props
object might lead to problems if the original object is mutated. Props could perhaps be serialized - is there a way to serialize/deserialize table references?:recreate
should accept a table of keys/values to change while recreating the element