ecsyjs/ecsy

Use `displayName` on Components and Systems

fernandojsg opened this issue · 2 comments

Similar to what React does, so we don't rely on class.constructor.name anymore as that will get mangled after using uglify it (eg webpack production, parcel, ...)
This will help with serialization #200 and tooling

It could be something like

class Position extends Component {}
Position.displayName = "Position";
Position.schema = {
 /* ... */
};

Already used and added System and Component and getName() to do displayName || constructor name