You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently if an element is wrapped with a component it creates all of its children just to throw them away.
Creating children first is only necessary because ChangesCallback mutates the existing props and children dicts. Children should not be read. Props has reasonable use-cases for reading e.g. darkening default background color. If we have ChangesCallback return the new props it wants to set then we preserve all existing functionality and we can compute children after ChangesCallback is ran. This would allow Wrapped elements to not compute their children until their template is created.
The text was updated successfully, but these errors were encountered:
roact-template/src/lib/init.lua
Lines 398 to 412 in 7205657
Currently if an element is wrapped with a component it creates all of its children just to throw them away.
Creating children first is only necessary because ChangesCallback mutates the existing props and children dicts. Children should not be read. Props has reasonable use-cases for reading e.g. darkening default background color. If we have ChangesCallback return the new props it wants to set then we preserve all existing functionality and we can compute children after ChangesCallback is ran. This would allow Wrapped elements to not compute their children until their
template
is created.The text was updated successfully, but these errors were encountered: