Defining Facets
Facets are simple data classes. Here are a couple examples:
#
Facet ClassesEvery facet must extend Facet<T>, with itself as the T
type parameter.
Facet attributes are declared as class fields.
You can either provide a default:
...in which case you should mark the field as optional. This is so the corresponding Facet Prop is also optional.
Or you can provide a type:
...in which case you should not mark the field as options. This is to ensure the corresponding Facet Prop is also required.
#
Facet TagsFacets may have no fields, in which case they may be used as marker tags:
#
Facet ComponentsFacets are automatically valid React Components. Use them within an Entity Declaration to associate them with an Entity: