Creates a new NextAttributeComponent.
Attribute payload with explicit key-value mappings
Converts the attribute payload to an XML-serializable object.
Extracts the key and value from each property and filters out undefined values.
Context (unused for attributes)
Object with _attr key containing the attributes
Next-generation attribute component with explicit key-value pairs.
NextAttributeComponent provides an alternative approach to attributes where each property explicitly specifies both its XML attribute name and value. This gives more control but is more verbose than XmlAttributeComponent.
Example