integrant

gmercer 2020-08-13T00:54:03.081800Z

Hi, I am having a bit of trouble grokking usage, is my handler init (dependent on a DB) supposed to grab the DB ref and store it locally (say in an atom) OR is the system meant to be visible from anywhere and you can just grab the db by key as needed?

gmercer 2020-08-13T00:55:41.082700Z

@weavejester sorry to bug - but you are obviously the ultimate fount of knowledge 😉

salam 2020-08-13T03:53:49.086500Z

@gmercer you can think of integrant as a dependency injection library (similar to spring core). you generally don't need to store those ig/refs in atoms since they are initialized/instantiated (by integrant) when a system starts up and don't change during runtime. it's those init'ed ig/refs you pass around as dependencies to other downstream components in a similar manner.

gmercer 2020-08-13T04:04:52.087800Z

@abdusalam I think everything is working as expected now - my routes now close over a passed in db ...

👍 1