-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automate component registration for JSX components #282
Comments
I leave my 2¢ here too: component registration is leaky (there’s a single component registry) and should happen exclusively when the developer understands the implications. |
See errors such as:
|
Hint: it will happen when multiple versions of the same component are loaded in the page. |
@yuchi throw a runtime error if the component is already registered is a good suggestion to make the component registry less "leaky". |
Actually that's what happens already. AFAIK it's in the spec. |
@yuchi I meant, throwing an error on Metal.js component registry, similar to what you described on custom elements. Wasn't that your suggestion? |
It is verbose and error-prone forcing the developer to call
ComponentRegistry.register
.Ideally, this should be automated by a transpilation step or a runtime operation.
With this change, the component definition will change from this
to this
The text was updated successfully, but these errors were encountered: