Implicit children and more with v0.5.2
· 2 min read
v0.5.2 introduces implicit children, critical changes to nested reactive values, and other small changes.
Here is everything that changed:
Childrennow supports a single instance without a table ([Children] = Instanceinstead of[Children] = {Instance})- Implicit children are now supported (read the documentation for
Childrenfor more info) - Rewrote the value packing/unpacking behind the scenes
- Removed
Value.ValueRaw - Removed reactivity from nested keys in table values
The two major changes with this update have to do with Children and Value.
Seam now supports implicit children, meaning you can make them without the Children declaration. To do so, just put them directly in the properties table, like so:
local Object = New("Object", {
-- Properties
Property = Value,
Property2 = Value2,
-- Children
New("Object", {
}),
New("Object", {
}),
})
Additionally, Value no longer reacts to nested table keys. The below example works in previous versions, but as of today it will no longer work:
local MyValue = Value({x = 5})
OnChanged(MyValue, function()
print("Detected change")
end)
MyValue.Value = {x = 6} -- Prints "Detected change" still
MyValue.Value.x = 7 -- Starting today, this will no longer trigger the print or other reactivity
Because this change was made, Value.ValueRaw is no longer needed, and GetValue now uses Value.Value.
That's all. Make sure to update to always get the newest improvements!