Interface IPureBuiltComponent
- Namespace
- BlazOrbit.Components
- Assembly
- BlazOrbit.Core.dll
Refined opt-in for components that contribute extra data-attributes and CSS custom properties
to the root <bob-component> element and guarantee their hooks read only
component Microsoft.AspNetCore.Components.ParameterAttribute properties or
pure getters derived from them. The marker promises:
- No internal field reads (
_isFocused,_isDirty, timers, counters, …). - No reads of mutable shared state (services, captured state objects).
- Output is a pure function of the parameter values.
Components that satisfy this contract participate in the style-fingerprint cache:
BOBComponentAttributesBuilder folds the hook contributions into the fingerprint, so
repeated BuildStyles calls with the same parameters short-circuit.
If a component breaks the contract — for example by introducing an internal focus flag — drop the marker and revert to plain IBuiltComponent. The cache otherwise freezes the stale value and the component renders out of date.
Pure inherits from IBuiltComponent, so the standard hook signatures and default
no-op virtuals on the base classes still apply. Declaring this marker on a derived component
is sufficient to opt in.
public interface IPureBuiltComponent : IBuiltComponent
- Inherited Members