Skip to content
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

Add check for already registered component before registering #1182

Open
santilland opened this issue Aug 5, 2024 · 1 comment
Open

Add check for already registered component before registering #1182

santilland opened this issue Aug 5, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@santilland
Copy link
Member

With migration to js+jsdoc from typescript we can now add a check when registering component so that no double registration attempt happens when importing elements multiple times.
eox-map needs to be migrated, but this could be done for all other elements

@santilland santilland added the enhancement New feature or request label Aug 5, 2024
@silvester-pari
Copy link
Collaborator

silvester-pari commented Aug 5, 2024

Relevant discussions of how/if this can/should be done:

lit/lit-element#207
https://github.com/storybookjs/storybook/tree/master/app/web-components#setup-page-reload-via-hmr

Need to research a bit more on the pros/cons of this...

Looking at how other libraries handle this, one example is pharos letting the user define/register the components: https://github.com/ithaka/pharos/blob/develop/packages/pharos/README.md#registering-components

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants