Fork me on GitHub

We have a large object of data that never changes after init. It's needed by events and views. Should it be in the :db? Or is the db only for data that could possibly change while the app is running? Currently we are passing the object around everywhere (a bit tedious)


Dynamically loaded or hard coded?


If hard-coded, just require it in every namespace where you need it. If dynamically loaded from some endpoint, then you probably want to put it in the db.


Dynamically loaded, only loaded once, very early on. (It's from a data attribute on a DOM node)


OK, we'll put it in the DB. I think we were just confused that we were subscribing to something that is not expected to change


If its from a dom node which is loaded before the script, I would again just read it into a var

👍 1

@aaron51 my advice us to put as much as you possibly can into app-db. I can't see a downside.

👍 1