I have a setup with two components. One is responsible for creating new data entries, while the other one is in charge of listing all the data stored in a database. The issue I'm facing is that even though the creation component successfully adds new data to the database, the lister component fails to update its view to display the newly added entry. It's strange because the data is indeed updated and retrieved from the database, but it's not reflecting in the lister component’s view. Here's an excerpt of the code for better understanding:
The "Maker"
// Code for the Maker component
The "Lister"
// Code for the Lister component
DB Service
// Code for the Database service
HTML Lister
// Code for the HTML template of the Lister component
Although the `refresh()` function works properly and is called by the maker component, the data displayed in the view doesn’t get updated accordingly. Upon further investigation, I suspect there might be two separate instances of the same data: one being shown and another being used by the refresh call triggered by the maker component. Is it possible that `[providers]` are operating on different threads or contexts than the ones they were initialized from?
If anyone has any insights or suggestions on how to resolve this issue, I would greatly appreciate it!