Heads up, I’m deprecating useEffect and splitting up the if chain into seperate methods. This is done mainly for performance (since the if chain was quite expensive), but also to improve typechecking since we know what type the getter should be ahead of time, instead of needing to rely on the otherwise entropic type getter<unknown>
It additionally makes it easier to implement an upcoming optimisation to effects when the effect is one of these built-in logic paths.
The associated replacement functions are
$children→ezui.useChildren,$tags→ezui.useTags,@propName→ezui.useChangeEvent,propName(wherepropNameis an event) →ezui.useEvent,propName(wherepropNameis a property) →ezui.useValue,
This update also adds getterUnion which makes it possible to define components as a value directly, or as a union of that value with a getter.
type Window = {
Size: ezui.getterUnion<UDim2>
}
...
ezui.useValueUnion(frame, "Size", options.Size)
I don’t like making big library changes like this, but this should be the only time it happens for a while.