I have not yet seen your Unsupported operation
message. Maybe some recent change. Your NoSuchMethodError
is common when a property of a class is only referenced by a polymer expression (HTML) because tree-shaking drops all code that is not referenced and polymer expressions are not evaluated for this yet. The @MirrorsUsed
annotation helps bridging this gap.
The problem is in your Post
class because it's properties are only referenced in polymer expressions
<div class="post">
<h3>{{ currentPost.ownerName }}</h3>
<p>{{ currentPost.title }}</p>
<p>This is the postId: {{ currentPost.key }}</p>
<p class="timestamp">{{ currentPost.uploadTime }}</p>
To get your view updated when the properties in your currentPost
change you should make your Post
class like
class Post extends Object with Observable {
@observable String ownerName;
@observable String title;
...
}
If you have an annotation like @reflectable
, @published
, or @observable
you don't need @MirrorsUsed
.