Replies: 1 comment
-
BTW, if someone knows such a library which also allows, maybe through a local option, consecutive calculations to be done automatically - for example, something like |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
requestUpdate
re-renders template when a reactive property changes in a direct, explicit and declarative manner before its call.requestUpdate
does not provide a mechanism which re-calculates values after a property has changed.Example
which renders into:
After clicking the button, we get
the colour remains the same; it has not changed. One could easily get confused and waste time trying to find out what is wrong.
this.requestUpdate
only updates the value ofthis.fruit
in the template. It does NOT re-calculate the value ofthis.colour
which is a reactive property, too.this.colour = this._findColour(this.fruit);
must be added (un-commented) in orderthis.colour
gets updated to the new value.Beta Was this translation helpful? Give feedback.
All reactions