function create()
Returns a builder modifier function that applies a render effect to a UI element.
function create<
T extends ViewBuilder & {
initializer: ViewBuilder.Initializer<any>;
},
>(name: EffectName, optional?: boolean): (builder: T) => T;
Notes
- Effects must be registered using register before use. If the effect is not registered, this method throws an error.
- Prefer using UIElement.ElementBuilder.effect on a UI element builder instead.
Parameters
- name — The name of the effect to apply.
- optional — True if the effect is optional, and missing effects should not be logged.
Return value
A function that can be passed to UIElement.ElementBuilder.apply.
Errors
This method throws an error if the effect has not been registered.
Related
interface RenderEffect
An interface for render effects that can be applied to UI elements.
