watermelon update not triggering observable
See original GitHub issueI’m running into an issue where I have 2 screens in react-native.
I’m observing the changes to this collection on a list view screen, and preforming item creation/updates on the second screen. Any creation that occurs is reflected on the list view, however when I preform an update to an item it doesn’t reflect on the list view. I’m at a loss currently and if there’s any more information/clarity I could provide please let me know.
const Screen = withDatabase(
withObservables([], ({ database }) => ({
games: database.collections
.get('games')
.query()
.observe(),
}))(SummaryListScreen)
);
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Connecting to React Components - WatermelonDB ...
withObservables is a general-purpose HOC for Observables, not just Watermelon. You can create new props from any Observable . Advanced: observing sorted lists....
Read more >I am successfully displaying my data using "withObservables ...
I am successfully displaying my data using "withObservables()" method but it's still not reactive to my component in WatermelonDB.
Read more >Thinking in nested streams with RxJS - Rangle.io
Working with nested data structures. One of my experiments with RxJS was traversing directories of files on my computer and returning a single ......
Read more >Observer Blocks don't detect melon/pumpkin stem updates.
The observer blocks notice all of the stages of the stems growing, but after the stem is fully grown the observer block does...
Read more >A Few Functional Uses for Intersection Observer to Know ...
You might not know this, but JavaScript has stealthily ... to check whether Intersection Observer is supported while you're working with it, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@mikebeyer You confuse two similar, but also very different things — observing a model/record (like Post in the quoted example), and observing a query (a list of things).
Note https://github.com/Nozbe/WatermelonDB/blob/master/docs/Components.md#reactive-lists :
Observing list re-renders the list if necessary — but each item should individually observe its corresponding record as well
Gotten it thanks…