Replies: 2 comments 1 reply
-
Also tried to override providers computed with keepAlive: |
Beta Was this translation helpful? Give feedback.
1 reply
-
Please provide a small code sandbox with what you are trying to do,
including how you consume the outputs. It's a bit hard to follow from the
description but from the question it seems your mental model is not
entirely accurate here, but it is hard to pinpoint from just an abstract
description 😅
…On Tue, Oct 8, 2024, 11:07 AM Vyacheslav Lomov ***@***.***> wrote:
Okay, with trace I found out that array actually was changed all the times
and autorun was fine coz array object was the same, and just values
changed, but how to get the same array from ObservableMap values?
—
Reply to this email directly, view it on GitHub
<#3933 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN4NBBQRTKAMGRQZ6RSHSLZ2OOF3AVCNFSM6AAAAABPROJXYOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOBXG43DKMQ>
.
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
-
Hi, I'm trying to get array from ObservableMap literally with
get providersMap(): ObservableMap<number, ProviderWithFoldersAndResources> { return this.providers.items; } get providersArray(): ProviderWithFoldersAndResources[] { return Array.from(this.providers.items.values()); }
My store is autoObservable and I tried to add @computed decorator to these getters, but if providerMap is cached, providersArray changes on every render.
Autorun on providers.items.values() also works fine.
Please tell me what's wrong?
Beta Was this translation helpful? Give feedback.
All reactions