Show updated data in Sibling Component in React using subscribe. #300
Replies: 1 comment 8 replies
-
Does this wiki page help? |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to use
subscribe
to show the updated data invaltio
but confused where to use it & how to use it.I tried searching on Sourcegraph to see code samples but couldn't find any about using subscribe in React.
My application looks like this:
On the right side, I type stuff & on the left side, it should update using subscribe.
This is relatively simple but I'm unable to find a way to do it.
I did put the
subscribe
undergetDocsById
which gets called when I click on the list on the left.However, it doesn't log anything to the console. I'm confused about where should I put subscribe & how should I update it in the list?
Full reproduction on this commit → https://github.com/deadcoder0904/docs-autosync/tree/cba10738b549d85aba9392f9a8e6d37db6af4725
Beta Was this translation helpful? Give feedback.
All reactions