Custom attribute converters

Override toAttribute and fromAttribute when a prop needs its own serialization, and delegate the rest to super. Both take the camelCase prop key, matching your static props declaration.

A Date prop and an Array prop

when is a real Date and tags is a real Array — reflected as an ISO date and a comma-separated list. Each button reports the attributes the conversion produced.

Parsed from markup

Attributes written from outside the component are parsed through fromAttribute, so these mount with a real Date and a real Array:

Why lossy conversion is safe

Reflection does not round-trip: when you assign a prop, wcb reflects it but never parses the attribute back — the value you assigned is already the source of truth. That is why when can keep its full timestamp while the attribute carries only the date. render() and onChanges still fire as normal.