Replies: 1 comment
-
It will only re-evaluate if an observable used by t has changed in the mean
time
…On Wed, May 14, 2025, 13:47 Artiom Neganov ***@***.***> wrote:
Hey folks, it seems like I'm missing some basic concepts.
Imagine we have a computed:
// in some observable class
get fooTitle() {
return this.t('Foo')}
And let's put that this.t() is an expensive operation.
It is my understanding, that whenever we call fooTitle getter, it will be
re-evaluated and it will trigger this.t() call.
Then what does means the following sentence in the docs:
They evaluate lazily, caching their output and only recomputing if one of
the underlying observables has changed.
https://mobx.js.org/computeds.html
—
Reply to this email directly, view it on GitHub
<#4551>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN4NBG7VLY4OVHK6FSG7RT26MUOPAVCNFSM6AAAAAB5DEMCHGVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZYGMZDGOJQGY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey folks, it seems like I'm missing some basic concepts.
Imagine we have a computed:
And let's put that
this.t()
is an expensive operation.It is my understanding, that whenever we call
fooTitle
getter, it will be re-evaluated and it will invokethis.t()
. Isn't that so?Then what is the true meaning of the following sentence in the docs:
https://mobx.js.org/computeds.html
Beta Was this translation helpful? Give feedback.
All reactions