Subscribing to a null-able branch #799
Unanswered
alexander-entin
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I would do this: let prev;
subscribe(p, () => {
const curr = snapshot(p).a
if (prev !== curr) {
console.log('changed');
prev = curr;
}
}); See also: #554 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to be notified of any changes in a given branch, including when it's deleted and recreated:
So, neither
subscribe
norsubscribeKey
help.I'm about to use this instead:
And my questions:
subscribeKey
to this one? Or to add a separate utility?Thank you
Beta Was this translation helpful? Give feedback.
All reactions