Example of usage of get , get(true) #194
Unanswered
Albert-White-Coder
asked this question in
Q&A
Replies: 0 comments
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.
-
Hello!
I am new to this fantastic state manager. I think the Doc has lack of good examples. I still did not understand what is the difference between get() or get(true) for an observer object. Anyone has an example that I can run to understand what it means?
I saw some short description at https://legendapp.com/open-source/state/tracing/ about them
Which basically tells :
You may want to call get() at a higher level in an object to only listen to it, and not every single child. Use a shallow listener with get(true) to only update when keys are added to or removed from the object. You may want to call peek() to not listen at all.
But I am looking for an example to understand it.
Many thanks for constructive inputs!
Beta Was this translation helpful? Give feedback.
All reactions