-
Notifications
You must be signed in to change notification settings - Fork 318
[0.6.0-dev.6] Class property doesn't update value in template/markup #174
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
Comments
Initializing values in the property options (like this) is not supported. This can be done via a class field (if/when supported) or in the constructor. Here's a working example: http://jsbin.com/seweyoy/edit?html,output |
Oh, wow! Thank you for helping me with code examples! 👍 I got the initializing of values in the property options from this post: https://coryrylan.com/blog/building-web-components-with-lit-html Look under the heading "Properties, Attributes and Decorators" at the XCounter class. He's actually using decorators their, but since I'm using Babel7 I decided to use his (commented out) static get properties example instead. Looks like until Bable7 when decorators are supported, I'll be doing my init in the constructors. Thanks again! |
I updated the post and code example to use the static property list by default to prevent further confusion :) |
I'm using lit-element 0.6.0-dev.6/webcomponentsjs 2.1.1 and ran into an issue that might be a bug.
Basically the value in the LitElement class increments/decrements (you can see from the console logging), but the this.value property on the class doesn't display the change in markup.
To make things easier, I built a repo to reproduce the issue: https://github.com/aadamsx/meteor-lithtml
The text was updated successfully, but these errors were encountered: