Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watch for changes #48

Open
rvetrsek opened this issue Jul 29, 2021 · 2 comments
Open

Watch for changes #48

rvetrsek opened this issue Jul 29, 2021 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@rvetrsek
Copy link

I'll probably be using this plugin in my new Vite+Vue+Electron app and I was wondering if there is a way that I can watch for changes in the DB? So for example, if I open two renderers and add/change the data in one that it would directly be reflected in the other.

@teamsuperpanda
Copy link

Not really. In this case I think the common approach would be to use Vuex.
Fetch the data from the database and then store it in your vuex store.

Multiple components can request to run an action in your vuex store which would then fetch a fresh copy of the database and store it in your store => updating the state => which triggers to re-render

@Erasmus001
Copy link

But if this little feature was to be implemented, it would reduce the precious time to write that logic and above all simplify the developer experience

@samuk190 samuk190 added the help wanted Extra attention is needed label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants