hood.ie with couchDB method to refresh pages with DB change

76 Views Asked by At

I've started using hood.ie to make a web app.

I wanted to ask is there a convenient way to refresh pages whenever data in the couch db changes?

Thanks.

1

There are 1 best solutions below

4
Gregor On BEST ANSWER

If you have a function that renders your page, like render, you can do this

hoodie.store.on("change", render)

The "change" event will trigger every time something changes in your data, be it because you called on of the hoodie.store APIs, or because of a changed synced from remote