You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.
The problem is that the systems accept only the default ComponentConstructor here. When creating custom component that doesn't need any schema, the developer ends up stuck with a constructor like:
The props argument contains attributes of the class ({ target: ... } in this case)
The props argument can be false
Fix
1. Make the system class accept more generic component constructor
2. Re-think the instantiation / reset of component
Regarding the constructor accepting false as props, wouldn't it make more sense to completely disable the schema check using a static argument? I am not sure what would be the use case of disabling the props schema per instance.
Would it be possible to allow to forward properties that aren't of this type?
Let me know what you think! Thanks
The text was updated successfully, but these errors were encountered:
Hi,
Right now, component constructor accepts only objects containing the same attributes as the component, and
false
to use schema or not:The problem is that the systems accept only the default ComponentConstructor here. When creating custom component that doesn't need any schema, the developer ends up stuck with a constructor like:
Which would work only if:
props
argument contains attributes of the class ({ target: ... }
in this case)props
argument can be falseFix
1. Make the system class accept more generic component constructor
2. Re-think the instantiation / reset of component
Regarding the constructor accepting
false
as props, wouldn't it make more sense to completely disable the schema check using astatic
argument? I am not sure what would be the use case of disabling the props schema per instance.Would it be possible to allow to forward properties that aren't of this type?
Let me know what you think! Thanks
The text was updated successfully, but these errors were encountered: