-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Custom elements only works the first time? #1342
Comments
To reproduce:
|
Hmm, it seems like the sandbox relies on global state. This can be fixed in two ways:
|
Here's an example sandbox: https://codesandbox.io/s/pj42p1v6wm |
You should define custom element only once. You can't to redefine it. It is prohibited in the spec. I guess you can get a new version of your component via It is similar with: skatejs/skatejs#564 |
@orlov-vo I'm not redefining custom elements, it is just that I run the same code more than once (because I'm developing). @Compulves I'll try the static option later, thanks for the response |
@CompuIves this is solved, thanks for your response |
in pure
|
🐛 bug report
Description of the problem
I'm using litElement to play with custom elements (but I guess the same happen to native custom elements) and the first time I run my app it works well, but after any change it complains
It seems like it tries to register a new component every time.
How has this issue affected you? What are you trying to accomplish?
Just a side project, but quite annoying bug actually.
Link to sandbox: link
Your Environment
The text was updated successfully, but these errors were encountered: